Enemies in scroll-shooter (chain of actions)

For questions about using Classic.

Post » Sun Dec 12, 2010 3:57 pm

Hello, I'm doing some scroll-shooter game, and want to set special path and action for every enemy, but there are few troubles: there will be large amount of enemies on screen, but ones with same names fly to one spot (that can be solved by lot of clones, but that will be confusing), and when I put several actions in one event, they are just ignoring it and go to the last spot. I tried to use "wait" function, but it require to compute time enemies need to move and etc. For sure, I do something wrong. Suppose to make 100+ enemies on every stage, so it'll be great, if solution will be simple.
In sample there are two enemies with same ID, both have own path. Tried to make them move, then stop, make shot and move again by waypoints.
Sry for my english and if my sample is too mazy.

download [broken]
B
3
G
2
Posts: 10
Reputation: 695

Post » Mon Dec 13, 2010 9:04 am

Help, can't make a game! =(
B
3
G
2
Posts: 10
Reputation: 695

Post » Mon Dec 13, 2010 1:17 pm

I can't download the .cap - (HTTP 403) Access denied
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Mon Dec 13, 2010 2:10 pm

Sorry, here it is:
LINK 1 or LINK 2
B
3
G
2
Posts: 10
Reputation: 695

Post » Mon Dec 13, 2010 3:05 pm

I'm not sure I understood everything. To make a path for enemies use great R0J0hound's plugin:
Path Movement Behavior
To make enemies use different paths, you could save paths in external files and then load them to specific enemies using variables
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Mon Dec 13, 2010 3:24 pm

Thanks, didn't know about that plugin. It's very useful in lot of cases, but I still don't know, why my sample doesn't work. An important detail is, that enemies should do actions in order, so waypoints can be easily changed and there won't be troubles with calculating time, they need to make full cycle.
Also, in my sample they don't go through mediate points and only one enemy make shot.
B
3
G
2
Posts: 10
Reputation: 695

Post » Tue Dec 14, 2010 11:15 am

You should use private variables when making enemies to make them distinct, that's why it doesn't work. Same with waypoints(with the plugin you'll not need that)
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Tue Dec 14, 2010 10:04 pm

Well, that's what I need. Private variables look pretty simple. Thank you very much.
B
3
G
2
Posts: 10
Reputation: 695

Post » Fri Dec 17, 2010 3:59 pm

I decided to use RTS, cause it's easier to edit coordinates and make additional waypoints in any place, and with private variables I can use one object many times. But there is still trouble with order of actions. I made a sample with two variants of it, but neither of them works. I'm afraid, that I simply don't understand something in Scirra, could you fix my sample please? An Important thing, that actions should be linked to each other directly. In other words, bot goes to the next task, only after ending previous (reaching the point, waiting and etc.).
<file>
(sometimes there appear two sprites instead of one, that's a glitch)
B
3
G
2
Posts: 10
Reputation: 695

Post » Sun Dec 19, 2010 11:07 pm

Also, there are object's coordinates in conditions, so problem can be in private variables. Actually, there are two different sprites on screen with their own paths, but for computer it's one object. Anyway, when I deleted one of clones, other one didn't work. Maybe, they don't take exact position, and, for example, there is x=200.01 instead of x=200.00? Can it be fixed? (link in previous post)
B
3
G
2
Posts: 10
Reputation: 695

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests