Need help on powerup

Talk about making games.

Need help on powerup

Postby 98700 » Sun Aug 19, 2007 12:26 am

Im making a game were there are powerups. The problem is im making a double shot powerup but dont know how. Before: . After: . . ! It starts as one shot in the middle of ship but after power up one on each side. PLZ help!
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Caaz Games » Sun Aug 19, 2007 9:20 am

ok i haven't used game editor in a while so ill try to think up something.
actor "Ship"> Collision event actor "Powerup"
Code: Select all
PUp = 1;      //add a variable named PUp

actor "Ship" > Keybutton down event "Whatever"
Code: Select all
if(PUp == 0)
{
      CreateActor("Shot", "NoPowerUp", 0, 0);
}
else
{
      CreateActor("Shot", "PowerUp", 0, 0);
}

that code wont work because the "CreateActor" thing isn't right you have to replace it with the code in GE.

I hope that works!

P.S. I'm back!
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby Bee-Ant » Sun Aug 19, 2007 12:04 pm

make a "power" variable, global or actor whatever...

in the "create actor" of your actor put this code :
power=0;

in "collision event" with PowerUpper actor(for example "gold") put this code :
power++;

then in your keydown event of your actor, put this code :
if(power==0)
{
Create Actor("Shot", "ShotImage", ("none"), ("none"), 0, 0);
}
if(power==1)
{
Create Actor("Shot", "ShotImage", ("none"), ("none"), 0, 0);
Create Actor("Shot", "ShotImage", ("none"), ("none"), 0, 5);
}

The second "if" code will create double shot...
I hope that code will help you...
note : don't copy-paste that code
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Postby 98700 » Sun Aug 19, 2007 1:17 pm

thank you guys.
How come i cant copy n paste :?:
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Caaz Games » Sun Aug 19, 2007 1:26 pm

this is the actual code for create actor
CreateActor("Actor", "Animation", "(none)", "(none)", 0, 0, false);
the ones we used dont have all the stuff
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Postby 98700 » Sun Aug 19, 2007 3:48 pm

wait how do i make a power variable? wat do i write in global code for variable? im a begginer :oops:
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Bee-Ant » Sun Aug 19, 2007 8:54 pm

Go to script editor from any actor...

then clik "User Vars" at the bottom side...

click "Add" then make that variable...

Global variable be in effect for every actor, Actor variable just for that actor...

If you will make "power" variable, make it as "string"

If you still confused, I'll make a demo for you...
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Postby 98700 » Sun Aug 19, 2007 9:06 pm

make demo plz :P :oops:
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score

Postby Bee-Ant » Wed Aug 22, 2007 2:32 am

Hi...this is your request
hope help you
Attachments
PowerUpDemo.zip
(100.29 KiB) Downloaded 86 times
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Postby 98700 » Wed Aug 22, 2007 7:05 pm

only two problems
1. they are going up
2. they are next to each other like ( . . ) that (one on each side of the ship)
Forum Me and Game A Gogo are administrating:
http://jacobtzgamz.freeforums.org/
98700
 
Posts: 106
Joined: Fri Jun 08, 2007 3:46 pm
Location: in your closet
Score: 1 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron