Home   Help Search Login Register  

Author Topic: delete Trigger  (Read 1026 times)

0 Members and 1 Guest are viewing this topic.

GrimMonkey

  • Guest
delete Trigger
« on: 30 Aug 2003, 01:32:47 »
Does anyone know a script which makes anyone come into a trigger disappear (using deleteVehicle, perhaps?)?

Thanks :).

Komuna

  • Guest
Re:delete Trigger
« Reply #1 on: 30 Aug 2003, 01:48:33 »
Okay.

Everytime anybody gets into a trigger, it's variable name will be recorded into a list (an array which can be called at the ActivField of the trigger through "thislist")

Then, all you must do (and you don't need a script) is "DeleteVehicle _x" forEach units thislist (At the ActivField, of course). Remember that the trigger shall be activated by "Anybody" and "Repeated"

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #2 on: 30 Aug 2003, 02:07:12 »
Much obliged. I have alrady put 'anybody' and 'repeadedly'.

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #3 on: 30 Aug 2003, 02:20:02 »
Everytime anybody gets into a trigger, it's variable name will be recorded into a list (an array which can be called at the ActivField of the trigger through "thislist")

Sorry, I'm just not soaking this up. I don't know much at all about arrays and lists :-\.

I got the rest, just not this.

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #4 on: 31 Aug 2003, 04:30:54 »
Hello?

Sorry, but I would like to have it soon. I'd fiqure it out myself, but I don't know much about lists and arrays. :)

Sorry for being pushy.  :)

SheepOnMintSauce

  • Guest
Re:delete Trigger
« Reply #5 on: 31 Aug 2003, 05:02:39 »
Grim, think of a trigger like a trap. If a unit moves into the 'trap' then it's name gets jotted down in a list (which is called an array), the name of this list of units that have been caught in the trap can be called 'thislist'. So to refer to the units that have entered the trap, you can use 'thislist'. It's as simple as that really.  :)

« Last Edit: 31 Aug 2003, 05:03:36 by SheepOnMintSauce »

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #6 on: 31 Aug 2003, 06:24:07 »
I typed Komuna's command but it didn't work. Nothing happened.  :-\

Thanks anyway, Sheep, at least now I know what people mean when refering to lists :).

It's getting late where I live, so I'll fuss with it in the morning.

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:delete Trigger
« Reply #7 on: 31 Aug 2003, 11:35:48 »
Does anyone know a script which makes anyone come into a trigger disappear (using deleteVehicle, perhaps?)?

Thanks :).


 :-\ I'm not sure if ya can delete EVERYTHING (using a repeated trigger) that walks into a trigger.
At least to my knowledge, those triggers tend to create an array of THE FIRST detected objects/units within that trigger's radius. And when ya want 'em to do it again, it just doesn't happen (off course, yer own CPU can be part of this problem too, hehe, especially if its a large trigger radius).

uuum, I DID manage to constantly respawn some stuff when a unit walked into a repeated trigg once, so maybe it does work after all - dunno, I never really got as deep into those triggers and their wicked ways as first planned.  :P ::) Deleting stuff seems to be the thing that the OFP game engine doesn't like to do.


 :D You COULD try it using a script, if that's not too overwhelming, m8


1. make a trigger, name it "T1" (in its NAME field) and place it on the hotspot.
2. execute the script (read the tutes if yer new to scripting) and let it count, create and delete the array - repeatedly.


 :-* hope it works!

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #8 on: 07 Sep 2003, 02:58:54 »
Thanks guys,
but I'm still not getting it :'(. My school just started and I will have little time to be working on my campaign, let alone Flashpoint altogether.

Please explain the syntax and its variables please. My mind is on other things constantly and my teachers d not go easy on 8th graders. I have a lot of homework to do ;), meaning I won't be able to search around myself.

Sorry to make you guys keep answering this :).

GrimMonkey out.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:delete Trigger
« Reply #9 on: 07 Sep 2003, 04:32:55 »
da main prob here wud b komunas syntax ;) :P

u sudnt use dis

"DeleteVehicle _x" forEach units thislist

but u shud use

"DeleteVehicle _x" forEach thislist

worked 4 me ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #10 on: 21 Sep 2003, 06:02:14 »
Sorry for answering late...

Big Newbie question!:

is '_x' a variable?

I feel stupid asking this but I need to know.

Please explain the syntax (I know most though),


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:delete Trigger
« Reply #11 on: 21 Sep 2003, 10:40:48 »
Now that's an intelligent question.

It is true that you can use x as a variable.     It would be a global variable, that is, if you defined it in a script you could use it in another script later.    However, if you defined a variable _x in a script you could not use it elsewhere:   variables starting with and underscore like this _ are local, not global:  they apply only to the script in which they are defined.

Now, in the case of the forEach command, _x is being used as a kind of special super-local variable.  

"_x command" forEach array

means execute the command on every member of the array.   _x stands for each member of the array in turn.   It's quite common to see something like

"_x command" forEach thislist

in the On activation field of a trigger.

Does that help?   Ask again if something's not clear.

Plenty of reviewed ArmA missions for you to play

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #12 on: 21 Sep 2003, 17:01:04 »
Thanks!

That really helped :thumbsup:.
Now I know something about it and can explain the syntax :toocool:.

If what you're saying is true (and it probably is), then LCD's syntax should work, hmm. I'll try again. Last time I wrote it through memory so I might have missed something, I'll be beat my computer up until it works then :joystick:

Thanks! ;)


Beware the GrimMonkey

GrimMonkey

  • Guest
Re:delete Trigger
« Reply #13 on: 22 Sep 2003, 02:01:48 »
I got it to work! ;D

What I did wrong was write
'DeleteVehicle_x' instead of
'DeleteVehicle _x'.

Finally, I can celebrate life.

:cheers: You guys rock! :thumbsup:


Bewate the GrimMonkey

Mr.BoDean

  • Guest
Re:delete Trigger
« Reply #14 on: 23 Sep 2003, 12:10:18 »
I hear ya, Grim. I had trouble grasping this one at first, too. Still trying to grasp some stuff in this crazy land of OFP editing. Download as many editing tutes as u can and print 'em out.
 :)  Good Luck!   ;)

...mutters something about being able to go back and  "endure" life as an 8th grader.....    ;D