HELP! about use of ammo

Game Editor comments and discussion.

HELP! about use of ammo

Postby PooAs » Thu Apr 03, 2008 10:30 am

hey,
i am making this game and i have an ammo count
i want to make it so when it reaches 00 you cant shoot, until you pick up ammo.
any ideas?? lol
If you try
to fix violence
with violence
you do nothing
but create violence
User avatar
PooAs
 
Posts: 29
Joined: Thu Apr 03, 2008 10:24 am
Score: 3 Give a positive score

Re: HELP! about use of ammo

Postby Caaz Games » Thu Apr 03, 2008 10:51 am

um let me think...

Put this in script editor of your shoot button.
Code: Select all
if(Ammo.textNumber==00)
{
         //nothing happens here
}
else if(Ammo.textNumber=<00)    //Credit to fredopedia
{
         Put your shoot Script here
}

replace Ammo with your ammo count actor name
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

Re: HELP! about use of ammo

Postby PooAs » Fri Apr 04, 2008 9:04 am

thanks heaps man

my code is this, and doesnt work lol

if(pistol_ammonumber.textNumber==00)
{
//nothing happens here
}
else if(pistol_ammonumber.textNumber=<00)
{
CreateActor("pistol_bullet_right", "bullet pistol right", "(none)", "(none)", 75, -5, false);

CreateActor("gun_bang", "explod2_00000", "(none)", "(none)", 80, -15, false);
}

it says:
error line 5: unknown type in binhconst

please help
If you try
to fix violence
with violence
you do nothing
but create violence
User avatar
PooAs
 
Posts: 29
Joined: Thu Apr 03, 2008 10:24 am
Score: 3 Give a positive score

Re: HELP! about use of ammo

Postby Bee-Ant » Fri Apr 04, 2008 9:42 am

PooAs wrote:else if(pistol_ammonumber.textNumber=<00)

how about
Code: Select all
if(pistol_ammonumber.textNumber>0)
{
    CreateActor("pistol_bullet_right", "bullet pistol right", "(none)", "(none)", 75, -5, false);
    CreateActor("gun_bang", "explod2_00000", "(none)", "(none)", 80, -15, false);
    pistol_ammonumber.textNumber-=1;
}
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

Re: HELP! about use of ammo

Postby PooAs » Fri Apr 04, 2008 9:55 am

thanks heaps :)
works real good
If you try
to fix violence
with violence
you do nothing
but create violence
User avatar
PooAs
 
Posts: 29
Joined: Thu Apr 03, 2008 10:24 am
Score: 3 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron