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
Defining a random x
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#3
RE: Defining a random x

Right, I know that, but I haven't found any guides for setting x equal to something. Do I literally just:

SetEntityActive("orbpiece_emerald_"+GetLocalVarInt("OrbPiece");, true);

or

for x = GetLocalVarInt("OrbPiece");
SetEntityActive("orbpiece_emerald_"+x, true);

Sorry, I'm sure this is very obvious to you, but I haven't done a lot of work with using i or x outside of "for" loops, and I'm fairly sure that doesn't apply in this situation. I'm totally in the dark for how to define "x" as a local variable.

Or now that I think on it some more, it might just be easier to bypass the whole local variable nonsense and do this:

SetEntityActive("orbpiece_emerald_"+RandInt(1,4), true);

(This post was last modified: 04-23-2012, 07:26 AM by Damascus.)
04-23-2012, 07:23 AM
Find


Messages In This Thread
Defining a random x - by Damascus - 04-23-2012, 06:07 AM
RE: Defining a random x - by Your Computer - 04-23-2012, 07:08 AM
RE: Defining a random x - by Damascus - 04-23-2012, 07:23 AM
RE: Defining a random x - by Your Computer - 04-23-2012, 08:03 AM
RE: Defining a random x - by Knittel - 04-23-2012, 01:19 PM
RE: Defining a random x - by Damascus - 04-23-2012, 08:01 PM
RE: Defining a random x - by Cranky Old Man - 04-23-2012, 08:07 PM
RE: Defining a random x - by overscore - 04-23-2012, 08:10 PM
RE: Defining a random x - by palistov - 04-23-2012, 08:40 PM
RE: Defining a random x - by Damascus - 04-23-2012, 10:53 PM
RE: Defining a random x - by palistov - 04-24-2012, 01:06 AM
RE: Defining a random x - by Damascus - 04-24-2012, 01:19 AM
RE: Defining a random x - by palistov - 04-24-2012, 02:25 AM



Users browsing this thread: 2 Guest(s)