NPC triggering
NPC triggering
How do I make pawn to trigger something? here's how I want it. When pawn dies moving platform starts moving.
Lithuanians for Georgia!
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
Or just use the following command
SetEventState(char *Trigger, bool State );
Set a trigger called Trigger to the true/false state of State. These triggers can be checked by other entities or by Pawns by using the Trigger name as the name of the desired trigger. If the state of the trigger has never been set then it will be off to other entities.
QOD's post kinda confused me so I tried Bernie's method, but I don't understand why doesn't it work. Here's the script:
Sorry is this is a really dumb question. I started learning RF scripting just now, because I didn't need it earlier
Code: Select all
{
Spawn[()
{
Console(true);
AttributeOrder("enemy_health",20,"Die");
SetFOV(360);
HostilePlayer(true);
HostileSame(false);
HostileDifferent(false);
SetGroup("Enemy");
}]
Die[()
{
Remove(true);
ActivateTrigger("try");
}]
}
Lithuanians for Georgia!
You are removing the pawn before it activates the trigger. The last order should be:
Code: Select all
Die[ ()
{
ActivateTrigger("try");
Remove(true);
} ]
Pain is only psychological.
ALSO: ActivateTrigger is a LowLevel command You can't mix HighLevel and LowLevel commands.
You need something like
{
Spawn[()
{
Console(true);
AttributeOrder("enemy_health",20,"Die");
SetFOV(360);
HostilePlayer(true);
HostileSame(false);
HostileDifferent(false);
SetGroup("Enemy");
}]
Die[()
{
LowLevel("trig");
}]
trig[()
{
ActivateTrigger("try");
HighLevel("Die1");
}]
Die1[()
{
Remove(true);
}]
}
You need something like
{
Spawn[()
{
Console(true);
AttributeOrder("enemy_health",20,"Die");
SetFOV(360);
HostilePlayer(true);
HostileSame(false);
HostileDifferent(false);
SetGroup("Enemy");
}]
Die[()
{
LowLevel("trig");
}]
trig[()
{
ActivateTrigger("try");
HighLevel("Die1");
}]
Die1[()
{
Remove(true);
}]
}