This works, I tested it.
;Artificial Intelligence Script
;Header
desc = Weapon Pickup
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudsize=18,hudtext=Hit 'F' to pick up a Colt 45,hudname=Coltprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:hudshow=coltprompt,state=12
:state=12,scancodekeypressed=33:hudunshow=coltprompt,playertake,coloff,rundecal=-1,plrsound=audiobankitemspickupweapon.wav,state=14
;End of Script
Instead of using hudfadeout use hudunshow.
If player gets within the distance
then show the hud and goto a new state. In the new state
if the player presses the "F" key
then hide the hud and take the weapon or any other entity. Then go from there to whatever you need to have done. e.g. having the player drop the weapon.
Hope this gets you started. Using FPI EditPad will help you have the correct syntax and the commands/definitions are included. Also, read the stickies regarding how to do scripting. Plystire has a couple of good threads of how-tos. The thing to remember is to write out your logic in plain english or whatever language you use in an if/then statement as I had done above. You construct your script lines according to those statements. What comes after the
if are the conditions and what comes after the
then are the actions to the script. I like to do a top/down format as much as I can. It makes it easier to follow.
__________________________________________________________
Make life a little easier and use
FPI Editpad for your sctripting needs. And it's free!
Now with Line Numbers. V3.3.8 is now available.
The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC