トピック
受付中
☆CodeZeяo☆ Code-Zero-666

Pedestrians and Multiple sprites

What is the best way to set up multiple sprites doing the same thing. such as multiple pedestrians walking in different places?
3そうだね
プレイ済み
返信[1]
親投稿
SıмΞоп SimeonW
Create a definition DEF SPAWNPEDESTRIAN SPSET ... SPOFS ... ... END Then, in the game, you could just spawn a bunch of pedestrians as the game world loads
0そうだね
プレイ済み
返信[2]
親投稿
☆CodeZeяo☆ Code-Zero-666
thank you! umm the things I have most problem with is like making 5+ sprites and making them move separately...
0そうだね
プレイ済み
返信[3]
親投稿
Guy brilliance360
You could probably use RND to determine when and what direction they travel.
0そうだね
プレイ済み
返信[4]
親投稿
☆CodeZeяo☆ Code-Zero-666
Ik how to do that it's the separating there x and y axis.
0そうだね
プレイ済み
返信[5]
親投稿
*J.P.* DEV NEWPICY3
yeah.. i haven't found anything yet.. nothing seems to be working
0そうだね
未プレイ
返信[6]
親投稿
Stewart segludian1
Q34443GD has my samples folder. You want to look at SPFUNCDEMO which has a bunch of fruit bounce around the screen. Using SPFUNC you can set a callback function for a sprite. During your game loop call CALL SPRITE one per frame which will call all registered call back sprite functions. Lines 3-17 is a bounce function. When in a callback CALLIDX has your sprite's ID number.
1そうだね
プレイ済み
返信[7]
親投稿
Stewart segludian1
I use SPVAR to store information about an individual sprite (you only get 7 variables unfortunately). This would be information specific to a particular pedestrian. Line 19-25 is the sprite setup. Notice the SPFUNC call on line 24, and that the function name is in double quotes (that part threw me the first time). Lines 26-29 is the game loop with CALL SPRITE on line 27.
1そうだね
プレイ済み