Home   Help Search Login Register  

Author Topic: problem on makin checkpoint (triggers)  (Read 978 times)

0 Members and 1 Guest are viewing this topic.

supergruntsb78

  • Guest
problem on makin checkpoint (triggers)
« on: 21 Oct 2002, 02:44:40 »
i am builing a mission where you have to get in to the enemy base by means of false papers

at the check point you have to show them to the guard

2 questions on this

#1 .is there a way to put the "show papers"  in the action menu instead of the radio menu ? (now its radio charlie)
and activate the trigger to put the papers on the desk

#2 .  i want the other guard to shoot you as soon as you drive trough the gate and have not shown your papers but.. as soon as you did show your papers and the guard commander lets you go the soldier is not allowed to shoot you (unless he sees you killing or something like that )

and i dot want to disarm the guard  ;)

thanks if anybody helps me out




Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:problem on makin checkpoint (triggers)
« Reply #1 on: 21 Oct 2002, 12:30:39 »
Dunno if it works, but the rating ingame can be used for making someone enemy to everyone.

If the Rating is negative, the unit (the player is this case) will considered 'enemy' to everyone:

player addRating -10

So, if the spy shows the papers just add more to the Rating again:

player addRating 10

or to be save: player addRating (Rating player)


Did someone tested this already ? Just read that in the comref yesterday.
« Last Edit: 21 Oct 2002, 12:31:00 by DrStrangelove »

david-p

  • Guest
Re:problem on makin checkpoint (triggers)
« Reply #2 on: 21 Oct 2002, 14:35:50 »
as for the action, uv got the radio execing a script yeah?
instead u need to find a suitable place 2 put this (script or trigger)
showpaper=player addaction["Show Papers","showpaper.sqs"]
then in the showpaper.sqs, do what u have already, then up the rating loads, and include this line somewhere at the top
player removeaction showpaper
hope that helps
dave

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:problem on makin checkpoint (triggers)
« Reply #3 on: 21 Oct 2002, 20:18:20 »
the addaction part there is correct, obviously, you'll need a script for it (you could add all sorts of animations and whatnot here if you want). As to how to add the thing once you're close enough, I suggest such a procedure:

make trigger, a/b 0, repeated, type: switch

condition line: aP Distance id_officer<5 && !papersGiven

just change those to whatever the names of the people are, and change the number (in meters) to when you want the action to appear. The papersGiven variable is something you need to define first, for instance in your init.sqs (this is a script which activates when the mission initializes). Just put in papersGiven=false somewhere, and you're fine.

On activation line: ActionId=Player addAction["Give Id", "giveid.sqs"]

On Deactivation: Player removeAction ActionID

the actionID is the "name" of the action, and it gets removed when aP moves more than 5 meters (in my example) from the unit id_officer (this is due to the switch nature of the trigger).

Now, just put in, at the start of your giveid.sqs script, papersGiven=true
Now, as you'll notice, it's impossible for the trigger to activate (condition: not(papersGiven)), the action disappears, and everyone is happy ;)

As to the guard shooting you...well, the easiest is probably the setCaptive command; to approach the base, just make yourself setCaptivated (aP setCaptive TRUE). Now, make a trigger covering the entrance, and make the
condition: ap in thisList && !papersGiven
on activation: aP setCaptive FALSE

the papersGiven was the variable which was set to true when you gave the papers; thus, if it's false and aP is in the trigger area (aP in thisList), the setcaptive is made false, and the guards will open fire. That is, if they're enemies from the start ;)

Otherwise, go with the rating thing. It rather sucks with them screaming "cease fire!" all the while trying to blow your head off, but what they hey...

Problems? Complain, and we'll come rushing :D Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

supergruntsb78

  • Guest
Re:problem on makin checkpoint (triggers)
« Reply #4 on: 22 Oct 2002, 11:09:01 »
ehmmmmmmmm  ehmmmmmm  ehmmmmm

ok ill try reading it again maybe it makes any sense to me then  :P

to bad i am not in to the scripting  :-\

if some body could make me an example i probably could learn until now i will try to decypher wolfrug's post  :P (sorry to the rest but this one explains the most and it tell exactly what i need)

i am just learning to play with triggers i made missions for some time now but with simple trigers now its time to get some heavy duty work in to it  ;D