I have another question
I have a game that supposively will rely on the use of "tools" quite a bit. You can relate the idea to old point and click adventures like "Kings Quest" and "Maniac Mansion" type of games.
To a certain extent the existing weapon system works. I have a few problems ... I was wondering if some of you can suggest solutions for given problems.
Pros
Allows me to equip any given tool.
I've writen a script so I can cycle through my slots using the TAB key which is what I want. (would allow for more than 10 slots)
Cons/Problems:
Only 10 Slots are allowed, if my script looks for slot 10 the game crashes.
I can't figure out a way to check if a slot is empty.
I can't figure out a way to check which current slot is active.
Inventory - differently
Inventory - differently
Last edited by Fallen on Sun Aug 20, 2006 3:28 am, edited 1 time in total.
To get more weapons slots is easy enough:Fallen wrote: Only 10 Slots are allowed, if my script looks for slot 10 the game crashes.
Open install/control.ini
and add weapons in this section:
Code: Select all
weapon0 = true
weapon1 = true
weapon2 = true
weapon3 = true
weapon4 = true
weapon5 = true
weapon6 = true
weapon7 = true
weapon8 = true
weapon9 = true
Code: Select all
weapon10 = true
weapon11 = true ... and so on.
You can do this by checking if the...Fallen wrote: I can't figure out a way to check if a slot is empty.
Code: Select all
GetAttribute("weapon_in_that_slots_name","player");
Last edited by Fallen on Sun Aug 20, 2006 3:44 am, edited 1 time in total.
Witty comment.
Sorry for not replying earlier, I kinda missed this topic.
Ok, so what is it exactly you are trying to do? Make the weapons in RF work as 'tools'? I'm sorry but I'm not familiar with the games you mentioned.
To add more weapons you don't have to touch the control.ini file. Just add the weapons in weapon.ini and define 'slot' to 10, 11, 12 etc...
I think you can have up to 40 different weapons (or tools in your case).
You can then check if a weapon is armed with self.player_weapon, which returns the slot of the currently armed weapon. You can also arm a certain weapon with the SetPlayerWeapon() command.
Could you explain a bit? Maybe then I could help more.
Ok, so what is it exactly you are trying to do? Make the weapons in RF work as 'tools'? I'm sorry but I'm not familiar with the games you mentioned.
To add more weapons you don't have to touch the control.ini file. Just add the weapons in weapon.ini and define 'slot' to 10, 11, 12 etc...
I think you can have up to 40 different weapons (or tools in your case).
You can then check if a weapon is armed with self.player_weapon, which returns the slot of the currently armed weapon. You can also arm a certain weapon with the SetPlayerWeapon() command.
Could you explain a bit? Maybe then I could help more.
Pain is only psychological.