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
A local variable int bug
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#2
RE: A local variable int bug

(05-28-2015, 11:09 AM)Mr. Badcatz Wrote: I am doing a script fuction using addlocals!
Now the script is supposed to check that the player got 2 variable locals, and when he got those 2 then a function will occur which i did here OnEnter:

PHP Code: (Select All)
if(GetLocalVarInt("getit") == 2)
 {
    
SetEntityActive("CaveIn_1"true);
    
AddDebugMessage("2globalshavebeenfound"true);
 } 

This is likely your problem. I remember that OnEnter only runs once when the player enters the map. It does not continue to run forever to check if the state of OnEnter has been fullfilled.

To achieve something that constantly checks if something has been achieved in HPL 2 I think you need to use a very fast timer.

[Image: Tv0YgQb.gif]
Image by BandyGrass
05-28-2015, 11:25 AM
Find


Messages In This Thread
A local variable int bug - by Radical Batz - 05-28-2015, 11:09 AM
RE: A local variable int bug - by Kreekakon - 05-28-2015, 11:25 AM
RE: A local variable int bug - by Romulator - 05-28-2015, 11:25 AM
RE: A local variable int bug - by Mudbill - 05-28-2015, 03:44 PM
RE: A local variable int bug - by Radical Batz - 05-28-2015, 05:16 PM



Users browsing this thread: 1 Guest(s)