Scrolling Game Development Kit Forum

SGDK Version 2 => General Discussion => Topic started by: Jam0864 on 2007-07-11, 04:35:34 AM

Title: A suggestion for a new rule
Post by: Jam0864 on 2007-07-11, 04:35:34 AM
I was thinking a random number generator, as a rule. (to make things different each time) You could have something like this

"do" random number generator, numbers between whatever. (users choice, one of those boxes you type into.)

"if" number generated = 1, load level 1

"if" number generated = 2, load level 2

etc

this could also be used to choose a random character, make it so when your touching an enemy sprite, a random amount of health between say, 20 and 30 could be taken away, possibly even a less predictable "computer player" (follow random paths, random enemies in certain spots, shoot random types of bullets, have random speeds)  or whatever else.  ;D  I'm not really sure if something like this is in SGDK 2 already, but I haven't seen it, so I suggested it.  ;)
Title: Re: A suggestion for a new rule
Post by: durnurd on 2007-07-11, 06:45:39 AM
I believe that there already is a random number rule in the latest alpha.
Title: Re: A suggestion for a new rule
Post by: bluemonkmn on 2007-07-12, 05:40:34 AM
Yeah, you probably already have it if you've been keeping up on the alphas at all.  It's called GetRandomNumber, and can be used from a sprite rule or a plan rule.
Title: Re: A suggestion for a new rule
Post by: Jam0864 on 2007-07-12, 07:00:14 PM
*checks version* Seems I have alpha 4, Getting alpha 5 now.  ;D
EDIT:Yes the rule is already implemented.  :) It seems I already had downloaded the alpha5 zip, just forgot to install it. lol