Home   Help Search Login Register  

Author Topic: need help with parameters!!  (Read 454 times)

0 Members and 1 Guest are viewing this topic.

nt3n

  • Guest
need help with parameters!!
« on: 02 Feb 2003, 16:32:27 »
I've got a little problem. I made a script to make a car explode after arming and a timer of x secs.
Now, in the Init field in the editor, to apply it to a vehicle, i used the following line:

this addAction["Arm bomb", "bomb.sqs"]

now, if i want to change the time i have to escape from the explosion, i need to look in the script.

is there a way of passing the the _timeleft parametre in an instrucion such as

this addAction ["actionname", "script.sqs"]

as you would do if the init field was

[objectname, parametre] exec "script.sqs"

????????

'coz

[objectname, parametre] addAction ["actionname", "script.sqs"]

DOESN't WORK!


TNX TNX TNX to anyone who replies => => he'll also be given credits in v. 2.0 of my script!!!!

if you want to give a look at the script, u can download this zip file

 :'(


RunAwayScientist

  • Guest
Re:need help with parameters!!
« Reply #1 on: 03 Feb 2003, 06:38:27 »


    Uhhhhhhhhhhh....Can't help ya there...

        But, I can offer a suggestion. In your Car-Bomb script, enter this command, somewhere in there, "timergo = true".

       Go into your Mission Editor, make a Trigger, and in the Conditions Field enter "timergo". In the activations, enter "[] exec "somescript.sqs" ". Set the X Axis to 0, and the Y Axis to 0, and your set. Make your "somescript.sqs" in the mission directory, and add whatever commands and or / parameters you want.

        Basically what your doing is when the script is fired, it activates the trigger, with your option to enter the parameters, instead of hassling with a "[Object, parameter, ice-cream, Kung-Fo cop, Old-man, Crack, Crack-With-Old-Man] this addaction ["Eat Drink", "eatdrink.sqs"]" type command.


        I hope you can under-stand me, if not, just post a reply saying that you don't under-stand a word I-''m ty-pi-ng-. An-y I-D-ea-?


        So, just in case you don't catch my drift, and to make a long post longer:

  1. You hit the action. "gotimer" is activated.
  2. Gotimer attached to a trigger which, in it's Activation Field, is "[Amountoftime, Car] exec "somescript.sqs".
  3. Wait....
  4. BOOM!

        Heh, course, that's just 2nd Year Old Talk......

           Once again I hoped it helped, if there's any questions contact me, or reply to my post...Errr...Course I think I covered it...Ya know what, why don't I go out and make an example mission right now? Actually, why don't I go to sle- (Falls asleep on keyboard).

       -RunAwayScientist