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
For loop help
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#2
RE: For loop help

Quote:- what is i++ for?

i++ basically says that each time the loop executes, the variable i will increase by 1. If you wanted i to increase by 2 each time the loop executes, you would write i += 2 (which is the same as i = i + 2)

Quote:-what if i want the loop to start at node 16 and not 1? Id it "PathNodeArea_16"+i then?

You would change the initialization for the loop (the part that says int i = 1) to int i = 16.

I would suggest reading this (link) for more information.

In Ruins [WIP]
02-17-2013, 11:19 PM
Find


Messages In This Thread
For loop help - by tonitoni1998 - 02-17-2013, 11:07 PM
RE: For loop help - by NaxEla - 02-17-2013, 11:19 PM
RE: For loop help - by darksky - 02-17-2013, 11:23 PM
RE: For loop help - by tonitoni1998 - 02-17-2013, 11:25 PM
RE: For loop help - by TheGreatCthulhu - 02-17-2013, 11:51 PM
RE: For loop help - by tonitoni1998 - 02-18-2013, 01:45 AM



Users browsing this thread: 1 Guest(s)