Virus Sector (development thread)

Post your Construct-made creations!

Post » Tue May 18, 2010 6:40 pm

Just make an event like you described it.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Wed May 19, 2010 4:43 am

Well, I tried your code R0J0hound, but nothing happens.

Here, check my .cap, see what I'm doing wrong: [url:32cprfyf]http://dl.dropbox.com/u/7129504/Virus%20Sector.cap[/url:32cprfyf]

Press right ctrl and an arrow key to fire in that direction. At the moment, you can only fire up.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Wed May 19, 2010 8:22 pm

On event 49 change "Else" to "'pistol ammo' greater than 0". It seems that while ELSE works in most cases it doesn't work in that case.

Only one "playercone" is needed so instead of spawning a "playercone" set it's position to "player1box".

Change "player1box pick closest to zombiebox.X, .Y" to "zombiebox pick closest to player1box.X, .Y" as we want the closest zombie not the closest player.

The condition "zombiebox overlaps playercone" needs to be changed to "zombiebox overlaps at offset (0,0) playercone" because otherwise a bullet will be shot at each zombiebox in the playercone.

Here is a modification of your cap with those fixes and a few more: download
+Muzzle animation unchecked Loop so it can be destroyed when it's animation is finished.
+added else event (event 52) so if there are no zombieboxes to shoot, a bullet will just be shot in the same direction as the player.
+cleaned up events 10-17 so they just set the angle of Player1 and set a global variable "DirectionPressed" to 1 which is previously set to 0 in event 3. "DirectionPressed" is then used in the weapon handling (event 48) so you don't have to handle all 8 directions all over again.
+ Finally Event 18 is changed to:
[code:3a1mu8cq]+ Player1box: is moving
-> Player1: Set animation to "Walk" & Player1 ('Weaponout')
+ System: Else
-> Player1: Set animation to "Stand" & Player1 ('Weaponout')[/code:3a1mu8cq]



I hope all that makes sense, let me know if anything doesn't. Cool project, has that gta feel to it.
-cheers
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Thu May 20, 2010 3:50 am

Wow. You have just made my job so much easier than it would have been! I'll make sure to credit you R0J0hound, when this is done. Thanks so much, I thought I'd be stuck on that problem forever! :D

Well, now that's all cleared up, I'll do some finishing touches on it and update the.cap in the OP.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Thu May 20, 2010 8:33 am

Ok, I've run into another snag. It's quite a simple one this time, I just really don't understand how to make the bullet object work with the "instant hit" command set on. Can anyone tell what I'm missing?
[url:25foitm9]http://dl.dropbox.com/u/7129504/Virus%20Sector%20new.cap[/url:25foitm9]
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Thu May 20, 2010 11:19 am

OR doesn't play well with triggers it would seem. As it is, the actions are run only if the conditions before the first OR are true. Put "on step" into a event by itself and put the rest of the conditions as a sub-event and it will work. Alternatively you could make all those objects part of a family and eliminate the need for OR. Your conditions would then look something like this:
[code:3pl7bj2u]+ On Step
+ Bullet overlaps stopfamily
[/code:3pl7bj2u]


PS: no need to give me credit, just glad to help.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Thu May 20, 2010 8:44 pm

I tried to help with your problem but OH GOD THE EVENTS.

(Consider using groups?)

But anyways, the game looks really great. Interesting buildings too.
B
3
S
1
G
4
Posts: 37
Reputation: 1,299

Previous

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 1 guest