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 for(int) [SOLVED]
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#6
RE: for(int)

(07-27-2014, 07:32 PM)Mudbill Wrote: Only scripts that return a specific value can be used in if-statements. This is because you're comparing two values. For example you can compare a string with a string, an int with an int or a boolean with a boolean. Comparing cross-values can be tricky, but whenever you see that a script has the type "void," that means it's not returning anything. It's like comparing nothing to something; doesn't work.

Never really thought of that, but a very good thing to know. Thanks.


(07-27-2014, 07:32 PM)Mudbill Wrote: What you can do here instead is to use local variables. Whenever you enable a light, use SetLocalVarInt("Lamp", 1);
Then in the question, use if(GetLocalVarInt("Lamp") == 1) instead.

I was thinking about the LocalVarInt, but I dont know how to script it up with the LocalVarInt so that the only lamp/torches that the player egnites that gets blown out

CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 07-27-2014, 07:46 PM by Lizard.)
07-27-2014, 07:44 PM
Find


Messages In This Thread
for(int) [SOLVED] - by Lizard - 07-27-2014, 05:36 PM
RE: for(int) - by PutraenusAlivius - 07-27-2014, 05:50 PM
RE: for(int) - by Rapture - 07-27-2014, 05:51 PM
RE: for(int) - by Lizard - 07-27-2014, 06:13 PM
RE: for(int) - by Mudbill - 07-27-2014, 07:32 PM
RE: for(int) - by Lizard - 07-27-2014, 07:44 PM
RE: for(int) - by Mudbill - 07-27-2014, 11:32 PM
RE: for(int) - by Lizard - 07-28-2014, 11:15 AM
RE: for(int) - by Romulator - 07-28-2014, 11:51 AM
RE: for(int) - by Lizard - 07-28-2014, 12:02 PM
RE: for(int) [SOLVED] - by Mudbill - 07-28-2014, 05:16 PM
RE: for(int) [SOLVED] - by Lizard - 07-28-2014, 08:33 PM
RE: for(int) [SOLVED] - by Mudbill - 07-29-2014, 12:41 AM
RE: for(int) [SOLVED] - by Lizard - 07-29-2014, 07:31 AM



Users browsing this thread: 1 Guest(s)