Frictional Games Forum (read-only)

Full Version: Unexplainable Error!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I planned to use after the player leaves the area or enters while it´s 1 that it sets back to 1, but that´s the problem! I DO use the place where the player spawns, but the area doesn´t work at all, and I made an AddEntityCollideCallback function that adds the int. :/
PHP Code:
void note_room_1_1(string &in asEntity)
{
    
AddGlobalVarInt("key_1"1);
    if(
GetGlobalVarInt("sanity_1") == 1){
        
AddGlobalVarInt("sanity_action_1"1);    
    }
    else{
        
AddGlobalVarInt("sanity_off_1"1);
    }
    
AddDebugMessage("key_1: " GetGlobalVarInt("key_1")
    + 
", sanity_action_1: " GetGlobalVarInt("sanity_action_1"
    + 
", sanity_off_1: " GetGlobalVarInt("sanity_off_1"), false);


Try this and see what the values actually are.
(11-17-2016, 09:46 PM)Mudbill Wrote: [ -> ]
PHP Code:
void note_room_1_1(string &in asEntity)
{
    
AddGlobalVarInt("key_1"1);
    if(
GetGlobalVarInt("sanity_1") == 1){
        
AddGlobalVarInt("sanity_action_1"1);    
    }
    else{
        
AddGlobalVarInt("sanity_off_1"1);
    }
    
AddDebugMessage("key_1: " GetGlobalVarInt("key_1")
    + 
", sanity_action_1: " GetGlobalVarInt("sanity_action_1"
    + 
", sanity_off_1: " GetGlobalVarInt("sanity_off_1"), false);


Try this and see what the values actually are.

If you´re pointing on that I use the same technique on the 1st area, then I have to say you´re very smart. I doubt it will work at all, the area is glitched. :/ I will try to make it on INTERACT instead.

Finally, OnInteract fixed it!
Pages: 1 2