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 A question of variables
shadowZgamerZ Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jul 2012
Reputation: 1
#5
RE: A question of variables

The way to do this:

void OnEnter
{
AddEntityCollideCallback("Player", "AREANAME", "FUNCTIONNAME", true, 1);
}

void FUNCTIONNAME(string &in asParent, string &in aChild, int alState)
{
if(HasItem("hammer") == true)
{
SetEntityActive("wooden", true);
}
else
{
SetEntityActive("servant_2, true);
}

NOTE: Function will reactivate itself if Player reenters the map, or put the script under OnStart(). Than, script will be activated when player visits the map for its first time only.

Project: Another Penumbra Story - Chapter 1 - Deep Underground
Level Editor: 18%, Scripting: 8%, Gameplay: 3 hours or more!
(This post was last modified: 08-31-2012, 04:48 PM by shadowZgamerZ.)
08-31-2012, 04:47 PM
Find


Messages In This Thread
A question of variables - by The chaser - 08-31-2012, 04:16 PM
RE: A question of variables - by GoranGaming - 08-31-2012, 04:22 PM
RE: A question of variables - by GoranGaming - 08-31-2012, 04:46 PM
RE: A question of variables - by shadowZgamerZ - 08-31-2012, 04:47 PM



Users browsing this thread: 1 Guest(s)