Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Random ? |
From: | Andrei |
Date: | Wed, 6 Sep 2000 22:43:46 +0100 |
Hello flashers !
I am trying to make a game and I need the units to move all over the screen
but with my script , they are pretty stupid and only move in a limited area .I
guess I am wrong at the random part ... I know that in C there's a kind of
function that 'seeds'the random number ..here I don't know how to get a real
random behaviour...well..except making very complicated expressions for
generating a number...is there any other better way (sure,all are better than
mine! :)..here's a part of the script :
(n is the number of units(MC's)).
--
Set Variable: "n" = 2
Set Variable: "i" = 1
Loop While (i<=n)
If (GetProperty (Eval("/p"&i),_x) <=400 )
Set Property (Eval("/p"&i), X Position) = GetProperty
(Eval("/p"&i),_x) + Random (10)
End If
If (GetProperty (Eval("/p"&i),_x) >=10)
Set Property (Eval("/p"&i), X Position) = GetProperty
(Eval("/p"&i),_x) - Random (10)
End If
// and the same for Y...
Set Variable: "i" = i+1
End Loop
--
thanks a lot for any help !
Andrei.
PS ... any new cool stuff in Flash 5 for game development ?
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Random not working in the browser, Motomichi
FLASH: Random not working in the browser, Motomichi
Replies
Re: FLASH: Dreamweaver vs. HTML in Notep, Hal Medrano
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]