New Doom Forums  
int playerammo - New Doom Forums
Go Back   New Doom Forums > Source Ports > Doom Legacy

Reply
 
Thread Tools Display Modes
Old July 17th, 2004, 03:10 PM   #1
Ebola
Commander Keen
 
Ebola's Avatar
 
Join Date: Jul 2000
Location: Sweden
Posts: 422
int playerammo

int playerammo(int plnum, int ammonum, {int amount})

I don't seem to quite understand how this one works.. it's explained in the FSfuncs but I don't understand most of those explanations..

Maybe I should hire a professional tutor
Ebola is offline   Reply With Quote
Old July 17th, 2004, 03:33 PM   #2
jnsg
Commander Keen
 
jnsg's Avatar
 
Join Date: May 2004
Location: Paris, Kentucky, USA
Posts: 111
Well, plnum is the number of the player whose ammo you are dealing with, ammonum is a number representing the ammo type (I don't know what they are though), and if you include amount, it will set that player's ammo to amount. I think. It returns the amount of that ammo type that the player has.
jnsg is offline   Reply With Quote
Old July 18th, 2004, 12:29 AM   #3
iori
 
iori's Avatar
 
Join Date: Sep 2002
Location: British Columbia
Posts: 2,415
for example:
Code:
playerammo(playerobj(0), weapon number, amount);
-playerobj():
0, 1, 2, and 3 being for players 1, 2,3 and 4.

-weapon number goes like this:
see Frades' post, mine was horribly wrong.

-Amount: Amount of ammo, heh.

playerweapon and playerammo supposedly be used to return the weapon and/or ammo as well, not just set it.

Last edited by iori; July 18th, 2004 at 01:00 AM.
iori is offline   Reply With Quote
Old July 18th, 2004, 12:35 AM   #4
Frades
Commander Keen
 
Frades's Avatar
 
Join Date: Jul 2003
Location: Estonia
Posts: 534
They are not.
If i remember correctly, those were messed up in some weird way.
For example 0 is in fact pistol/chaingun ammo.. or something like that.
At least i think that's the way it is.. but this is a minor problem, since it's not too hard to try them all unti..
Oh well, i'll open up thwq and look.

Edit:
0 - bullets
1 - shells
2 - cells
3 - rockets

Code:
script 7 // player ammo
{
playerammo(2, 0, 12);
}
startscript(7);
So this would give 12 bullets to player 3.

Last edited by Frades; July 18th, 2004 at 12:49 AM.
Frades is offline   Reply With Quote
Old July 28th, 2004, 10:53 AM   #5
Ebola
Commander Keen
 
Ebola's Avatar
 
Join Date: Jul 2000
Location: Sweden
Posts: 422
So. is there something equal for all the settings for the player Like weather he got a berserk or not or how much health he got etc?
Ebola is offline   Reply With Quote
Old July 28th, 2004, 11:00 AM   #6
Cherepoc
Commander Keen
 
Join Date: Jul 2004
Location: Russia
Posts: 157
objhealth - how much healh has object.
Cherepoc is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Still Learning to Program... jester Legacy 2.0 Development 2 October 28th, 2004 05:26 AM
Compile Errors PyRo] Doomsday 17 October 6th, 2004 02:45 PM
Legacy CTF is coming soon.... maybe. :-p Rellik_jmd Doom Legacy 68 May 3rd, 2003 01:10 AM
New source code problem Jow Doomsday 2 January 4th, 2003 04:01 AM


All times are GMT -7. The time now is 08:49 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
NewDoom.com © 2000-2009 Mindless Games & Entertainment. All Rights Reserved.