Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,302 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
End of enemies, End of game #131395
05/23/07 22:57
05/23/07 22:57
Joined: May 2007
Posts: 43
Austin, TX
Afox Offline OP
Newbie
Afox  Offline OP
Newbie

Joined: May 2007
Posts: 43
Austin, TX
I know there are lots of ways to trigger the end of a game but I am wondering how to end the game when all enemies are dead or you run out of bullets rather than walking into a trigger.

Here is the scenerio. A hunting game. Player does not move, he is like a turret. There are entities (ducks) using dumb ai that fly around the level. Player can shoot them. when all ducks are dead game ends with a splash sceen that says you win. If you run out of ammo before all ducks are dead game ends with a splash screen that says you lose.

Any idea how to script this?


A7.86 Pro/Artist
Alex's 3D
Re: End of enemies, End of game [Re: Afox] #131396
05/24/07 00:59
05/24/07 00:59
Joined: Sep 2005
Posts: 508
Texas
not_me Offline
User
not_me  Offline
User

Joined: Sep 2005
Posts: 508
Texas
*whistles* good luck with that one .lol. i suck at scripting.


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: End of enemies, End of game [Re: Afox] #131397
05/24/07 01:25
05/24/07 01:25
Joined: Mar 2005
Posts: 725
USA
TeutonicDarkness Offline
User
TeutonicDarkness  Offline
User

Joined: Mar 2005
Posts: 725
USA
Quote:

I know there are lots of ways to trigger the end of a game but I am wondering how to end the game when all enemies are dead or you run out of bullets rather than walking into a trigger.

Here is the scenerio. A hunting game. Player does not move, he is like a turret. There are entities (ducks) using dumb ai that fly around the level. Player can shoot them. when all ducks are dead game ends with a splash sceen that says you win. If you run out of ammo before all ducks are dead game ends with a splash screen that says you lose.

Any idea how to script this?





This would be quite easy actually you just need to set some
varibles for the ducks, and for your ammo level.


If you know how may ducks your going to have total
something like this:

var ducks_alive = 50;
// in your action reduce duks alive by 1
// each time a duck is killed

/////////////////////////////////////////////////



IF (ducks_alive == 0)

{
wait(1);
congrad_pan_ON; // turn on Congardualtion panel
wait(10);
congrad_pan_OFF; // optionally turn off panel now?
// End game or go to menu
}


//////////////////////////////////////////////////////
For when your out of ammo

///////////////////////////////

var bullet_suppy = 100;
// once again reduce bullet suppy
// by -1 for each bullet fired

IF (bullet_suppy == 0)

{
wait(1);
you_loose_pan_ON; // turn on Congardualtion panel
wait(10);
you_loose_pan_ON; // optionally turn off panel now?
// End game or go to menu
}


This is not a fully working script just an example
of how you can acheive this...




Hope it helps...


*** Teutonic Darkness ***

Re: End of enemies, End of game *DELETED* [Re: TeutonicDarkness] #131398
05/24/07 05:16
05/24/07 05:16
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Post deleted by testDummy

Re: End of enemies, End of game [Re: testDummy] #131399
05/24/07 15:51
05/24/07 15:51
Joined: May 2007
Posts: 43
Austin, TX
Afox Offline OP
Newbie
Afox  Offline OP
Newbie

Joined: May 2007
Posts: 43
Austin, TX
Thanks. I will play with it for a while. I am so new at scripting it will take quite some time to get it working but at least I have a direction now.

Oh and should be attaching this function to the ducks action or players action?


A7.86 Pro/Artist
Alex's 3D

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1