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
PropHealth problem
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#1
PropHealth problem

hi want that a plate breaks when the player enters an area: so heres the script

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""ScriptArea_1""opendoor"true1);
}

void opendoor(string &in asEntity)
{
        
SetPropHealth("plate_9"0.0f);


why wont this work Sad

Cruel ways 2: Something went wrong
8.04.2012


(This post was last modified: 04-07-2012, 04:20 AM by Quotentote.)
04-07-2012, 03:32 AM
Find
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#2
RE: PropHealth problem

Are you sure that the function is even being called? Try inserting a debug message. If it is being called, attempt to change 0.0f to 0.1f. I may be talking out of my ass here though as I have not yet dealt with SetPropHealth Tongue

The Nightmares v1.0 - Dreadful Fires WIP
04-07-2012, 03:48 AM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#3
RE: PropHealth problem

void opendoor(string &in asParent, string &in asChild, int alState)

try that

make sure you're getting the parameters right for functions alled by a callback function. The required perimeters should be listed in the description of the callback function (as found here).

(This post was last modified: 04-07-2012, 03:55 AM by Homicide13.)
04-07-2012, 03:55 AM
Find
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#4
RE: PropHealth problem

works... maaan im too dumb ;3
i will never know when i have to use what kind of synthax T_T'

anyways, thank you bot Wink

(100th post \o/)

Cruel ways 2: Something went wrong
8.04.2012


04-07-2012, 04:19 AM
Find




Users browsing this thread: 1 Guest(s)