Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / about sprites..

Author
Message
lokatsis
22
Years of Service
User Offline
Joined: 11th Feb 2004
Location: greece
Posted: 30th Apr 2004 14:57
hi i'd like to ask something about multiply a sprite.
you see i have a sprite and i want to multiply it to ten sprites
in random places and to move all together from up to down.
i have tried with for next commands but only the last is moving.
see some of my code:
x=100
y=100
for n=1 to 10
sprite n,x,y,1
next n
sync
inc y,10
as you see i made the command to move sprites the problem is - i say again- that only the last is moving the other sprites are not moving.
i thing that the problem occures at the n varable i used.
in other words i just want to give the same properties to all sprites using a variable
i hope someone to help me thanks

THE AOOS
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Apr 2004 16:05
This works.....I've tested it


sync on
x=100
y=100
do
for n=1 to 10
sprite n,x+(n*32),y,1
next n
sync
inc y,10
if y > 400 then y = 100
loop

lokatsis
22
Years of Service
User Offline
Joined: 11th Feb 2004
Location: greece
Posted: 30th Apr 2004 23:25
thanks a lot paxton.

THE AOOS

Login to post a reply

Server time is: 2026-06-09 15:43:29
Your offset time is: 2026-06-09 15:43:29