Top down shooter (4 way shooting problem)

Game Editor comments and discussion.

Re: Top down shooter (4 way shooting problem)

Postby Johnno » Sat Mar 24, 2012 1:20 am

ok so that works!!!

No doubt I'll be back with more questions!

Thanks so more for the feedback and help so far skydereign. Once I'm finish this demo I'll post a tutoral of it, just as a way of thanking the forum.

Next on my list of helps is I have a count down timer which I want to stop at a check point, then I want to multiply that time by say 10 and add it to the score.
I already have a countdown and score working for pickups, bonuses etc. I'll search the forum for a solution before I come back for help.
Johnno
 
Posts: 23
Joined: Thu Mar 22, 2012 2:56 am
Score: 4 Give a positive score

Re: Top down shooter (4 way shooting problem)

Postby Johnno » Tue Mar 27, 2012 3:23 am

I've got a few problems that need to be fixed.

1. I'm using the Moveto function to move the View to the score page. Depending on where my player is when he hits the Collision sprite, my move is to a different location every time (buy about 10-15 pixels). I'm guess it's something to do with the "Relative to" option. Is there another way to move the View to an precise location?
Exit the level from different locations and see whats happening!

2. The score page works, but I can't get the XP values and load them to the next level. I added the values to a Variable called xp but it ended up looping and the xp score just kept on increasing!
Example: (time x 10) + (ammo(clip) x 100) + (xp from completed level) = new xp score at the start of level 2. I'm guessing I need to stop the Draw Actor from the first level?

I ended up using the following code but it's just a stop gap for me to see that it sort of works.

xp_bonus, Draw Actor, Script
Code: Select all
sprintf(text, "%02d", VirtSec*10 +  clip*100 + xp);


Keys.
arrows - move
space - shoot, go on you know you want to!
The Deck Lift (red circle ) will take you to the score page. Don't forget to pick up the Ammo and Med Pack! - I can't take any credit for the map artwork, Amiga fans will recognize it!
Attachments
TopDown.zip
(975.7 KiB) Downloaded 94 times
Johnno
 
Posts: 23
Joined: Thu Mar 22, 2012 2:56 am
Score: 4 Give a positive score

Re: Top down shooter (4 way shooting problem)

Postby Johnno » Tue Mar 27, 2012 3:55 am

Ok I ended up creating another variable called xp2. Which now doesn't cause the looping problem, which I can use for the next level - yay!

I still have a problem with the MoveTo issue.
Johnno
 
Posts: 23
Joined: Thu Mar 22, 2012 2:56 am
Score: 4 Give a positive score

Re: Top down shooter (4 way shooting problem)

Postby Johnno » Tue Mar 27, 2012 5:39 am

I tried using..

view.x = 960;
view.y = -420;

still doing the same thing
Johnno
 
Posts: 23
Joined: Thu Mar 22, 2012 2:56 am
Score: 4 Give a positive score

Re: Top down shooter (4 way shooting problem)

Postby Antxion » Fri Mar 30, 2012 2:16 am

Thats Awesome Johnno

Im going to use that code on my game
+1
"Only through fire is a strong sword forged."
May the force be with you.
User avatar
Antxion
 
Posts: 22
Joined: Sun Mar 25, 2012 1:04 am
Score: 0 Give a positive score

Re: Top down shooter (4 way shooting problem)

Postby skydereign » Fri Mar 30, 2012 6:47 am

Sorry for the delay, have been busy with finals. Anyway, the problem is that the view's position is relative to the player. To fix this (seeing as you are destroying the player anyways) is to unparent the view. I wouldn't suggest using MoveTo for that anyways.
Code: Select all
ChangeParent("view", "(none)");
view.x=score_bk.x-view.width/2;
view.y=score_bk.y-view.height/2;
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Top down shooter (4 way shooting problem)

Postby Johnno » Fri Mar 30, 2012 11:35 am

Oh so simple but so effective.

I'd given up on it (till now) and had moved to something else.

Thanks. :D
Johnno
 
Posts: 23
Joined: Thu Mar 22, 2012 2:56 am
Score: 4 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest