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 Riddle, is there a better way to do this?
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#2
RE: Script Riddle, is there a better way to do this?

You can just work with its subString
PHP Code: (Select All)
PushBackBook2(string &in asTimer)
{
    
SetPropObjectStuckState(StringSub(asTimer112), 0);


And basically just get 12 characters of asTimer excluding the first one.

Other way would be to declare a LocalVariable for the current book.
Something like this:
PHP Code: (Select All)
PushBackBook1(string &in asTimer)
{
    
SetPropObjectStuckState(asTimer, -1); //Pushes the book back
    
SetLocalVarString("CurrentBook"asTimer);
    
AddTimer("2"+asTimer0.25f"PushBackBook02"); //then just 0.25 seconds later the same book is put into the normal state. 
}

PushBackBook2(string &in asTimer)
{
    
SetPropObjectStuckState(GetLocalVarString("CurrentBook"), 0);

(This post was last modified: 02-25-2016, 02:23 AM by Spelos.)
02-25-2016, 02:14 AM
Find


Messages In This Thread
RE: Script Riddle, is there a better way to do this? - by Spelos - 02-25-2016, 02:14 AM



Users browsing this thread: 1 Guest(s)