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
I need some help.
Sanshi Offline
Junior Member

Posts: 14
Threads: 5
Joined: May 2012
Reputation: 0
#6
RE: I need some help.

(05-09-2012, 06:58 PM)Adrianis Wrote:
(05-09-2012, 06:36 PM)Sanshi Wrote: Hello! New guy here, I have just set up my Room, and I want to make it so when I touch an object, it disappears, you get a little sanity damage and it's all good.

I think I've done the first part right... no idea how to put in the other stuff.

Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player" , "Stephano1" , "StephanoGone" , true , 1);
}

{
SetEntityActive("Stephano1", false);
}


Any other things I need to add... the script function list is so long, not easy to find the things I need.

And yes I watch PewDiePie, therefore: Stephano.
So, that 'SetEntityActive' needs to be executed as part of the callback. You've set the callback, so when the player collides with the object it calls the function 'StephanoGone'. You want to add some sanity damage too... The callback function should be this,

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

{
SetEntityActive("Stephano1", false);
GiveSanityDamage(float afAmount, bool abUseEffect); (replace float afAmount with amount of damage to deal, and bool abUseEffect as whether to use the sanity damage effect)
}

Bear in mind, I've never used the sanity damage function but I would imagine that works... It's all taken from the engine scripts page on the wiki mate, you just have to look for what you want on there

Also, this should be posted in the Dev support forum Smile
I just found out something, the Script works, but not when I pick him up... only when I "touch" him... like pick him up and drop him on my face... then he disappears. How can I do it so it happens when I pick him up?
05-09-2012, 07:00 PM
Find


Messages In This Thread
I need some help. - by Sanshi - 05-09-2012, 06:36 PM
RE: I need some help. - by Cranky Old Man - 05-09-2012, 06:43 PM
RE: I need some help. - by Prelauncher - 05-09-2012, 06:46 PM
RE: I need some help. - by Sanshi - 05-09-2012, 06:54 PM
RE: I need some help. - by Cranky Old Man - 05-09-2012, 07:04 PM
RE: I need some help. - by Adrianis - 05-09-2012, 06:58 PM
RE: I need some help. - by Sanshi - 05-09-2012, 07:00 PM
RE: I need some help. - by Adrianis - 05-09-2012, 07:03 PM
RE: I need some help. - by Adrianis - 05-09-2012, 07:07 PM
RE: I need some help. - by Cranky Old Man - 05-09-2012, 07:14 PM
RE: I need some help. - by Sanshi - 05-09-2012, 07:28 PM
RE: I need some help. - by Cranky Old Man - 05-09-2012, 07:40 PM
RE: I need some help. - by Adrianis - 05-09-2012, 07:22 PM
RE: I need some help. - by Kreekakon - 05-09-2012, 07:40 PM
RE: I need some help. - by Putmalk - 05-10-2012, 04:55 AM
RE: I need some help. - by darkadders - 05-10-2012, 07:43 AM



Users browsing this thread: 2 Guest(s)