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 Selection From a List?
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#3
RE: Selection From a List?

What you want is an array, it goes like this:

Let's say I want to choose a random enemy from a list. This is the code:

Spoiler below!

PHP Code: (Select All)
string[] Enemy = { "grunt""suitor""brute" };
int randomNum RandInt(0,2);

AddDebugMessageEnemy[randomNum], false ); 


Every time I run that code I get a diff string from the list.

12-20-2014, 03:34 PM
Find


Messages In This Thread
Selection From a List? - by BonesTheRabbit - 12-20-2014, 09:41 AM
RE: Selection From a List? - by 7heDubz - 12-20-2014, 03:21 PM
RE: Selection From a List? - by Daemian - 12-20-2014, 03:34 PM
RE: Selection From a List? - by BonesTheRabbit - 12-20-2014, 09:26 PM



Users browsing this thread: 1 Guest(s)