Home   Help Search Login Register  

Author Topic: onmapsingleclick  (Read 719 times)

0 Members and 1 Guest are viewing this topic.

Azraell

  • Guest
onmapsingleclick
« on: 27 Dec 2002, 19:24:23 »
hey :D   how can i setpos a marker to the place i click with onmapsingleclick?  some help would be appreciated ;D

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:onmapsingleclick
« Reply #1 on: 27 Dec 2002, 19:38:15 »
try this

onMapSingleClick {"markername" setmarkerpos _pos}

Azraell

  • Guest
Re:onmapsingleclick
« Reply #2 on: 27 Dec 2002, 19:44:57 »
heh, just getting back on to say nevermind, i got it to work ;D.....thnks for the quick response anyhow:)...

_pos a reserved variable within the game?

Azraell

  • Guest
Re:onmapsingleclick
« Reply #3 on: 31 Dec 2002, 21:02:20 »
ok, new prob with this..... it does like its suppose to for x,y,but the marker is being placed at sea level, not ground level(this is for a helo evac script) so i get the script tweaked out for 1 position, but if i click any where else on the map the script wont work cause its a different height :( ....so if the helo is flying at 25  and i say- helo distance marker<=26:helo flyinheight 0 ...that wont work :(  cause the marker is below ground and the helo is further than 26 from the marker....how can i get exact position of click x,y,and z (ground level z that is)

thanks for any help you can give :)

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:onmapsingleclick
« Reply #4 on: 31 Dec 2002, 22:58:26 »
The current level of the ground or water is always z == 0 to my knowledge.  Thus set the x and y as you have been doing, but always set z to 0, for whatever you're doing with it.
Ranger

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:onmapsingleclick
« Reply #5 on: 01 Jan 2003, 04:13:41 »
if I remember right the distance command doesn't work with markers, so setpos a gamelogic to the marker position and check the distance with that.

Azraell

  • Guest
Re:onmapsingleclick
« Reply #6 on: 01 Jan 2003, 13:55:21 »
ok, ill try a gamelogic....ive tried already an invis pad and a marker, so maybe a logic might do it :) thanks guys!    it gives correct height when map click command is in a trigger....but i want it in the script so itll all be self contained....has my new formula for keeping choppers on the ground till all are in....ALWAYS on the ground till they get in.and no land or getin commands are used in the process.

its a secret till i release it :P   just 1 little looped command keeps her down :D i had it with addaction but i wanted it to also be used with mapclick, but its givin me static with the height>:(

Azraell

  • Guest
Re:onmapsingleclick
« Reply #7 on: 01 Jan 2003, 15:38:29 »
naw that didnt do it....ill just keep the script mapclick free.....1 prob that it may be is the fact i cant use mapclick command like every1 else for some reason...if i try


onmapsingleclick{}
blah blah
blah blah



....it goes directly to blah blah instead of waiting for map click,ive seen other scipts where the sqs is activated and it was waiting for click....they didnt do anything special to make it wait, same as u see above. i gotta do this to make click work for me...



onmapsingleclick{thingy setpos _pos; go=true}
@go

blah blah
blah blah  


.......only then will thingy get setposed to _pos and blah blah will happen ??? in fact, when i 1st started working with the click command....


onmapsingleclick{}
thingy setpos _pos
blah blah
blah blah

....worked, but only once :'(  , then i had to put the commands in the brackets. when i made a new script to start over...

onmapsingleclick{}
blah blah
blah blah

...worked, but only once, and again i had to use...

onmapsingleclick{thingy setpos _pos; go=true}
@go

blah blah
blah blah  

whats the deal with that?...forget it, i dont even wanna know :-X

addaction is just as good for what i am doing, just wanted to add a little extra zip to it.