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?
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#4
RE: Selection From a List?

(12-20-2014, 03:34 PM)Daemian Wrote: 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.

This is exactly what I was looking for. I had forgotten the appropriate term. Thanks very kindly.
(This post was last modified: 12-20-2014, 09:34 PM by BonesTheRabbit.)
12-20-2014, 09:26 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)