Home   Help Search Login Register  

Author Topic: removeaction  (Read 459 times)

0 Members and 1 Guest are viewing this topic.

Offline ryankaplan

  • Members
  • *
  • yeah...
removeaction
« on: 01 Oct 2004, 18:19:07 »
ok. i have a computer on a table with 5 Target Es next to it. There is a trigger next to the computer (1.5X1.5), at east = present, repeatedly.

the trigger:
EAST PRESNT, REPEATEDLY
condition : this and getdammage PC <1
on activation : (thislist select 0) addaction ["Revive Targets","targets.sqs"]

what i need now is a removeaction on the on deactivation field.

I tried (thislist select 0) removeaction 2
but that doesn't work i think beacuse when you deactivate teh trigger, you are no longer in "thislist". when i replace it with somebodies name it works, but this is a coop mission.

any help will be apprciated. thanks

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:removeaction
« Reply #1 on: 02 Oct 2004, 00:07:47 »
If you just want the action to appear in the player's action list when he approaches the computer, then add the action to the computer in its init line or init.sqs.

Actions call a script.   The first line of the script usually removes the action.    In this case the second line could check the if the computer was damaged and redirect the script accordingly.   For info on how to remove actions see the online comref or search the forum - there was a good thread on this a few days ago.
Plenty of reviewed ArmA missions for you to play

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:removeaction
« Reply #2 on: 03 Oct 2004, 16:59:29 »
well, it was 23.00 when i wrote that. I forgot that when you get close to something or someone with an action, it appears on your action menu too.

well, thanx alot macguba.
my script is

Quote
?(getdammage pc == 1) : goto "damaged"

target1 setdammage 0;
target2 setdammage 0;
target3 setdammage 0;
target4 setdammage 0;
target5 setdammage 0;

?(getdammage pc <1) : exit

#damaged
pc removeaction 0

exit

the thing is, is it possible to come up with a messge like "the computer is broken" without showing it to all the players? hint or cuttext shows it too all players. it is a coop level and all players are in the same group.
« Last Edit: 03 Oct 2004, 17:08:30 by ryankaplan »