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
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Entity's physics not setting to static

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.

(This post was last modified: 08-07-2016, 10:19 PM by Mudbill.)
08-07-2016, 10:17 PM
Find


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



Users browsing this thread: 1 Guest(s)