Home   Help Search Login Register  

Author Topic: Ok, im finding this mapaclick thing hard...  (Read 901 times)

0 Members and 2 Guests are viewing this topic.

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Ok, im finding this mapaclick thing hard...
« on: 11 Feb 2004, 18:53:47 »
Ok, some of u may hav seen the post i made about the 'onmapclick' thing but i really need help. I've got an explosion script, and i want it to be activated after around 15 secs, where the player has made a marker. i tried to modify snypir's usermarker script from the smoke script he made, or to try and learn how he did it but nothing succeeded. HELP ME PLZ  :'(
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline Spinor

  • Members
  • *
  • I'm a llama!
    • The chain of command
Re:Ok, im finding this mapaclick thing hard...
« Reply #1 on: 11 Feb 2004, 23:00:11 »
The syntax to define the map click handler should look something like this
Code: [Select]
onMapSingleClick{"myMarker" setMarkerPos _pos; [_pos,15,...] exec "explosionscript.sqs";true}You can put it into any Init-line or the "init.sqs" script. It defines the code to be executed everytime the player clicks on the map. In the above case, it moves the marker "myMarker" (which you have to place in the editor) to the click position and calls your explosionscript with the click position and the time delay as parameters. As I do not know the explosion script I can only guess what its parameters are. The easiest way to create the time delay is to modify the explosionscript like:
Code: [Select]
_pos = _this select 0
_delay = _this select 1
;etc... any other parameters

;this causes the script to pause for _delay seconds
~_delay

;continue explosion script

Hope this helps,
Spinor

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Ok, im finding this mapaclick thing hard...
« Reply #2 on: 12 Feb 2004, 18:04:56 »
didn't work.......the script gives me an error when i try to camcreate the explosion because it dont recognise the position.
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!

Offline Spinor

  • Members
  • *
  • I'm a llama!
    • The chain of command
Re:Ok, im finding this mapaclick thing hard...
« Reply #3 on: 12 Feb 2004, 18:09:40 »
Well, I have no idea what the script looks like, hence I was only guessing how it has to be executed. Could you post the script?

Azraell

  • Guest
Re:Ok, im finding this mapaclick thing hard...
« Reply #4 on: 13 Feb 2004, 05:09:37 »
http://azraell.rendervisions.com/downloads/explosionscript.zip


Here, download this i made real quick.

Put it in ur user/missions folder with ur other editor missions...
open in ur editor and start it and click on the map and wait 15 seconds.

Study it, learn it, know it ;)
« Last Edit: 13 Feb 2004, 05:12:46 by Azraell »

Offline wired

  • Members
  • *
  • Explosion Scripter for the [unsung] mod!!!
Re:Ok, im finding this mapaclick thing hard...
« Reply #5 on: 14 Feb 2004, 16:39:42 »
Cheers man....thats gr8........it finally works!
WHHAAAAAAAAHOOOOOOOOOO!!!!!!  ;D ;D ;D ;D ;D ;D ;D

U've really helped guys, thanx a bunch!

wired
We have a problem at 'Oscar-Charlie 2-7' do you read me? Well its that guy with the RPG!