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 Entity's physics not setting to static
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: Entity's physics not setting to static

(08-07-2016, 10:17 PM)Mudbill Wrote: Wait, you're using asParent+i ? That would be incorrect, since you've already done "rock_"+i above. How about this:

PHP Code: (Select All)
void UseRockOnPedestal(string &in asParentstring &in asChildint alState)
{
    
AddGlobalVarInt("ElementsPuzzle"1);
    
PuzzleCheck();
    
SetPropStaticPhysics(asParenttrue);
    
PlaySoundAtEntity("""impact_rock_high.snt""Player"0false);
    
GiveSanityBoost();


No need to do the for-loop twice, because you've already created callbacks for each individual rock. Doing so would effectively just double it, making it become rock_1_1 or in your case rock_10, rock_21, rock_32, rock_43 because you're adding another number (the +i onto asParent) to a name that already has a number.

I already tried doing it that way before. It didn't work either. The functions are called because I'm able to complete the puzzle but I can still carry the rock with me.
08-07-2016, 10:35 PM
Find


Messages In This Thread
RE: Entity's physics not setting to static - by Slanderous - 08-07-2016, 10:35 PM



Users browsing this thread: 1 Guest(s)