Pawn Weapons

Topics regarding Scripting with Reality Factory
Post Reply
Masta_J
Posts: 37
Joined: Tue Apr 17, 2007 1:35 pm
Location: Johannesburg South Africa

Pawn Weapons

Post by Masta_J »

Sup guys, sorry for the double post, forgot to add this question to the last one. How do I get my player pawn (genericplayer) to have a weapon and pick up or have multiple wepons? I've added my weapon model to the "SetWeapon" command in Spawn Order, but still no weapon.... I've searched the manual and the forums and found nothing. Much Appreciated
A good warrior knows his limits, but a great warrior finds his way around them.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

SetWeapon(char* SectionName);

SectionName must be the name of a section in Pawn.ini. Like pawns themselves. The only difference is this line at the end of the pawn declaration declaration:
type = weapon

Example:

[Sword]
...
...
...
type = weapon


I hope this makes it clear enough.


More than one weapon is also possible, but you will need this release:
http://www.realityfactory.info/forum/vi ... php?t=2138

Notice the then changed SetWeapon-command:
SetWeapon(char* sectionname, int slot);
and also make sure that the slot number 0 is always filled. (its a bug i am trying to get rid of but otherwise it works good)
You can use up to 16 weapons on one pawn when you use this release.
Everyone can see the difficult, but only the wise can see the simple.
-----
Post Reply