Page 1 of 1
Noobie Question's
Posted: Mon Oct 29, 2007 6:48 pm
by creekmonkey
As I am very new to RF I am in need of help. I want to make a trigger to open a door when a pawn Dies. I have searched the forum and read Dan Valeo's book but am still confused. I am able to make a trigger open the door when the trigger is touched. But I want to trigger the door when a pawn dies. I have read the post on the subject and attempted to put in the ACTIVATETRIGGER("trig1") cammand in the DEATH routine But I keep getting the error "ACTIVATETRIGGER" not found. Do I need to define the trigger elsewhere in the script?
Posted: Mon Oct 29, 2007 6:59 pm
by Juutis
The command is called ActivateTrigger(), not ACTIVATETRIGGER(). There's a difference between a normal letter and a capital letter.

Posted: Mon Oct 29, 2007 9:08 pm
by creekmonkey
I have the correct spelling in the script itself, just caps in the post.
Posted: Tue Oct 30, 2007 1:29 am
by federico
You are probably using the right command in the wrong level. RF script has two levels: High-level and Low-level. The latter is quite similar to C and execute the commands as frame loop, the former execute the list of commands as a task manager. The command names usually differ in the two levels. So I don't think ActivateTrigger exists in lowlevel, try SetEventState(your_trigger_name, true); if you are in lowlevel.
Are you in lowlevel? that's the question: your script starts highlevel and executes the orders before the pawn death. So before the last order, somewhere before, there should be a LowLevel(""); command to switch to lowlevel, otherwise you're still in highlevel.
Posted: Tue Oct 30, 2007 10:11 am
by bernie
ActivateTrigger is a LOW LEVEL command and does not exist in high level.
In the death routine replace the command
Remove(true);
with
LowLevel("operatetrig");
then add a new order
operatetrig[()
{
ActivateTrigger("trig1");
HighLevel("Death_2");
}]
then add another order
Death2[()
{
Remove(true);
}]
That should do the job for you
Posted: Tue Oct 30, 2007 10:31 am
by steven8
Yargh. I've asked this more than once of people, how do we know high level fom low level. I'm sorry, but federico's explanation doesn't really get it for me. Would someone please post a colored-up script showing low and high and denoting the point at which we can tell we have gone from high to low?
Thanks.
*whew* - I just had to get that out. Sorry.
Posted: Tue Oct 30, 2007 10:38 am
by bernie
Steven. I try to make low level orders start with small case ie blahblah[() and high level orders start with upper case ie Blahblah[() is sort of helps a bit. If thatss what you mean.
Posted: Tue Oct 30, 2007 10:41 am
by steven8
That's cool, but how do I know, if I'm fixing to use a command, whenther it's a high or low level. Say, if I have no example at hand?
Posted: Tue Oct 30, 2007 10:47 am
by bernie
Check it up in the doc's. A lot of commands are both high and low level these days anyway. All the commands are listed in the doc's under pawn scripting.
Posted: Tue Oct 30, 2007 10:48 am
by steven8
bernie wrote:Check it up in the doc's. A lot of commands are both high and low level these days anyway. All the commands are listed in the doc's under pawn scripting.
I just downloaded Dan's book as well. It's time I RTFM. . .I'd say.
Thanks bernie.
Posted: Tue Oct 30, 2007 11:29 am
by federico
I agree with bernie about the use of capital letters while writing an highlevel order. Sorry about the wrong info I was sure that activatetrigger was only highlevel.
Anyway I would add that the use of SetEventState gives you more control on states and triggering...
Posted: Tue Oct 30, 2007 5:09 pm
by creekmonkey
Thanks guys
Using the LowLevel for the Trigger and HighLevel to remove the player worked for me.