TheIcyPickle
Member
Posts: 80
Threads: 16
Joined: Feb 2011
Reputation:
0
|
Player Run Into Door, Explosion
Hey forum.
Wondering if this were possible. I have an idea of how to script it, just not sure what to use.
I'm trying to allow Player to ram himself into a locked door which is loose by the hinges to cause it to explode off.
Currently, I am using AddEntityCollideCallback to have the player run into a script box that is close to the door that/for
1) To activate the unlock sequence
2) the explosion sequence
3) If player is running.
Going through the script functions page I found at first look, there is nothing of total use.
Here is what I have thus far::
void OnStart()
{
AddEntityCollideCallback("Player", "script3", "door", true, 1);
}
//then following...
void door(string &in asParent, string &in asChild, int alState)
{
//Add if Player is running here
CreateParticleSystemAtEntity("", "ps_impact_dust_low.ps", "script3", false);
SetPropHealth("prison_1", 0.0f);
SetSwingDoorLocked("prison_1", false, true);
}
This is all fine and dandy, it works, but, I want this to happen IF player is running.
I can't seem to find the right function to call for that if statement.
Can you guys help me out?
|
|
03-30-2013, 05:39 AM |
|