The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Player Run Into Door, Explosion
TheIcyPickle Offline
Member

Posts: 80
Threads: 16
Joined: Feb 2011
Reputation: 0
#1
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
Find


Messages In This Thread
Player Run Into Door, Explosion - by TheIcyPickle - 03-30-2013, 05:39 AM
RE: Player Run Into Door, Explosion - by NaxEla - 03-30-2013, 07:42 AM
RE: Player Run Into Door, Explosion - by NaxEla - 03-30-2013, 09:19 AM
RE: Player Run Into Door, Explosion - by WALP - 03-30-2013, 01:54 PM
RE: Player Run Into Door, Explosion - by Tiger - 03-30-2013, 03:38 PM



Users browsing this thread: 1 Guest(s)