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
Help.. Again :)
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#8
RE: Help.. Again :)

(08-31-2012, 12:25 AM)Harthex Wrote: Right off the bat
SetEntityPlayerInteractCallback("door smash 1, door smash 2, door smash 3", "func_slam", true);


Don't use various ones at once
Do this \/
SetEntityPlayerInteractCallback("door smash 1", "func_slam1", true);

SetEntityPlayerInteractCallback("door smash 2", "func_slam2", true);

SetEntityPlayerInteractCallback("door smash 3", "func_slam3", true);
This is true.

Also, if you're looking to save space, you can do it like this:

for(int i=1;i<=3;i++)SetEntityPlayerInteractCallback("door smash "+i, "func_slam"+i, true);

And it will achieve the same effect. This is very useful for scripts that call the same function on multiple entities at once, such as turning off all the lights in a room or so on. You can call it all on one line, instead of multiple lines.

[Image: signature-2.png]
(This post was last modified: 08-31-2012, 03:19 AM by Streetboat.)
08-31-2012, 03:19 AM
Find


Messages In This Thread
Help.. Again :) - by Fanstetic - 08-31-2012, 12:08 AM
RE: Help.. Again :) - by Kazakarumariou - 08-31-2012, 12:25 AM
RE: Help.. Again :) - by Fanstetic - 08-31-2012, 12:32 AM
RE: Help.. Again :) - by Streetboat - 08-31-2012, 03:19 AM
RE: Help.. Again :) - by Kazakarumariou - 08-31-2012, 12:32 AM
RE: Help.. Again :) - by Fanstetic - 08-31-2012, 01:22 AM
RE: Help.. Again :) - by Kazakarumariou - 08-31-2012, 01:43 AM
RE: Help.. Again :) - by Fanstetic - 08-31-2012, 02:25 AM
RE: Help.. Again :) - by FlawlessHappiness - 08-31-2012, 06:29 AM
RE: Help.. Again :) - by Fanstetic - 08-31-2012, 07:22 AM
RE: Help.. Again :) - by Steve - 08-31-2012, 08:19 AM
RE: Help.. Again :) - by Fanstetic - 08-31-2012, 08:49 AM
RE: Help.. Again :) - by FlawlessHappiness - 08-31-2012, 10:59 AM



Users browsing this thread: 1 Guest(s)