Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Show icons of guns you have picked up?

Author
Message
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 31st May 2010 14:59
Is there a way you can show icons of all the guns you have picked up and the corresponding slot number for that weapon? Kind of like in Half Life 2, just without the multiple weapons in a single slot.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 31st May 2010 18:38
Yes, I think there is a way.

First, each weapon would need a custom script for the pickup.
It seems most weapons, from MP9's AKM to the Fantasy Crossbow & Arrows, use the good old stock weapon.fpi for their AIMain.

If each weapon had its own script then it could read and write to variables that are assigned to the slots.
If the slot equaled zero then it would know to use that slot and then it would assign the slot variable the weapon number.
If no slot equaled zero then it would ignore the assignments. (in the case of picking of a second instance of the same weapon)
Of course, the slots would be checked sequentially.

A separate display script that runs independently could read the slot variable values and disply the corrensponding icon for all slots.

I think it is very doable, but it would take a considerable amount of scripting.
One display script, and one script for each weapon used in that game.
You'll also be taking up 9 of the available global variables for the slot values.

   Conjured Entertainment

 WARNING: Intense Madness
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 31st May 2010 19:20
Before I can even start, I need to look up some tutorials as I never used the scripting language when I was using fpsc in the past, just decided to get back into it.

How many global variables is there to work with?

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 1st Jun 2010 00:30
Quote: "Before I can even start, I need to look up some tutorials as I never used the scripting language when I was using fpsc in the past"

This might be a bit much for someone starting out with FPI.
If you do attempt it, then I recommend learning as much about how to use the variables as you can.
If what I said above made sense to you then you may be able to pull it off, but it will probably be a challenge.

Quote: "How many global variables is there to work with?"

About a hundred.

1-99

   Conjured Entertainment

 WARNING: Intense Madness
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 17th Jun 2010 23:05
nice, another good possibility, should have a advanced tutorial for scripting around the forum, before making the scripts, we should be sure if anyone didn't did already, ok ?
then we can be able to work in this script, or you did it already ?

mods for creating a inteligent game,at least

Login to post a reply

Server time is: 2024-11-24 23:22:34
Your offset time is: 2024-11-24 23:22:34