The Daily Click ::. Forums ::. Klik Coding Help ::. random item drop Question...
 

Post Reply  Post Oekaki 
 

Posted By Message

curtaineater



Registered
  12/06/2003
Points
  23
12th June, 2003 at 15:12:38 -

yeah, im dumb. but please help. im making an arcade style autoscrolling game and need to know how to make it random that an enemy will drop either a lifeup item (1/10 chance or so) or money (about 4/10 chance). i do it as when OBJECT is destroyed set Alt Val B (already using a) to random(9). then if B=1 drop heart B=2-5 drop money, but it just creates tons of money and/or hearts! what can i do!? thanks

 
n/a

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
12th June, 2003 at 16:03:26 -

Try adding the condition Pick an object at random (under Pick or Count) to the event.

 
gone fishin'

HOSJ



Registered
  01/07/2002
Points
  669
12th June, 2003 at 16:05:54 -

If the destroyed animation is playing, it will keep generating numbers and using them.
Do
When Enemy is destroyed, Set Alterable ValB to "random(9"
AND set Alterable ValB to 10.

It should work.

 

"They'll never find the bodies"


Ashman

Santa



Registered
  19/05/2003
Points
  644
13th June, 2003 at 02:50:39 -

see - http://www.create-games.com/forum_post.asp?id=32499

 
SAnTA - www.atnas.com

-------------------
www.create-games.com/download.asp?id=2918
   

Post Reply



 



Advertisement

Worth A Click