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 Using Global.hps to use a script in every level
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#3
RE: Using Global.hps to use a script in every level

(05-14-2013, 12:39 PM)JustAnotherPlayer Wrote:
void OnGameStart()
{
    StartLocketLoop();
}

void StartLocketLoop() //There's an extra ;
That's one. I'll give you some lecturing here.

[if(GetPlayerSanity() >= 70 && !HasItem("HighSanityLocket"))]

Look at the code above. Do you see a bolded text? [!] in AngelScripting and C++ meant not. The code above is equivalent to...
[if(GetPlayerSanity() LARGER/EQUALS TO 70 AND NOT HasItem("HighSanityLocket"))]

Removed the extra ;. I derped on that one. However, even the debug message of "Locket Looping" isn't appearing (not sure it should from global.hps). And the if statement is what I want (Over 70 Sanity and doesn't have the item -> Give item).
05-14-2013, 01:20 PM
Find


Messages In This Thread
RE: Using Global.hps to use a script in every level - by Cyfiawn - 05-14-2013, 01:20 PM



Users browsing this thread: 1 Guest(s)