Random image not moving

Get help using Construct 2

Post » Mon Dec 31, 2012 9:02 pm

I have the code to spawn 1 of 4 sprites at either spawnA location or SpawnB location. How do I get the sprites to move left?
B
5
Posts: 21
Reputation: 892

Post » Mon Dec 31, 2012 9:34 pm

Give them the bullet behaviour, then use bullet move at angle (180) action in event sheet.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Wed Jan 02, 2013 4:31 am

I gave it 180 angle and movement 100*dt and only one moves but not the next 3, but the first one moves the next time it is generated.
B
5
Posts: 21
Reputation: 892

Post » Wed Jan 02, 2013 6:18 am

make sure you set it for each bullet behaviour object. if your still having troubles post a capx.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Wed Jan 02, 2013 10:34 pm

Gave it bullet behavior and it only comes out from the right side 100 pixels then moves backwards and disappears.
B
5
Posts: 21
Reputation: 892

Post » Wed Jan 02, 2013 10:42 pm

^ Read the posts you wrote ... You programmed the bullet like that
Also , set " set angle to angle of motion " to " No"
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Wed Jan 02, 2013 10:44 pm

[QUOTE=jayderyu]if your still having troubles post a capx.[/QUOTE]
Sounds like something is a bit off in your project, it would be a lot easier for us to help if we could see for ourselves. If you save your project as a single file and upload it to a filehost like dropbox you can post the link here on the forums.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jan 03, 2013 12:47 am

Here is the section for the carts to be displayed.

Global number Cart_pick_EID =0
Global number Next_Spawn_time = 0

System |Next_Spawn_time <_ time |Set Next_Spawn_time to time+random(3,1)

System | Pick a random sprite1 | Spawner Instance | System Set Cart_pick_EID to choose(1,2,3,4)

System | Cart_pick_EID = 1 | Spawn Cart1 on layer 0 (image point 0)

System | Cart_pick_EID = 2 | Spawn Cart2 on layer 0 (image point 0)

System | Cart_pick_EID = 3 | Spawn Cart3 on layer 0 (image point 0)

System | Cart_pick_EID = 4 | Spawn Cart4 on layer 0 (image point 0)
B
5
Posts: 21
Reputation: 892

Post » Fri Jan 11, 2013 10:56 pm

Somebody know what is wrong with my code?
B
5
Posts: 21
Reputation: 892

Post » Thu Jan 17, 2013 12:28 am

Here is the capx file.
https://www.dropbox.com/s/aqqweflpctnrz9g/HM.capx
B
5
Posts: 21
Reputation: 892

Next

Return to How do I....?

Who is online

Users browsing this forum: GUN and 15 guests