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 / [RE]Script Request : starting with NO health info etc, then after a trigger getting it all back.

Author
Message
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 28th Dec 2009 17:57
Iceman, I don't know why your thread was locked but I'll help you anyway.

First of all, navigate to setuplevel.fpi located in
FPS Creator/Files/languagebank/english/gamebank/mygame/setuplevel.fpi. Open it up using Notepad or FPI Editpad. Find the four lines:

:state=0:hudreset,hudx=4,hudy=8,hudsizex=16,hudsizey=16,hudimage=,hudtype=1,hudmake=numeric
:state=0:hudreset,hudx=15,hudy=5,hudimage=,hudmake=display
:state=0:hudreset,hudx=14,hudy=8,hudsizex=16,hudsizey=16,hudimage=,hudtype=2,hudmake=numeric
:state=0:hudreset,hudx=85,hudy=8,hudimage=gamecore\huds\ammo.tga,hudtype=3,hudmake=status
:state=0:hudreset,hudx=88,hudy=12,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=3,hudmake=numeric

and replace them with this:

;state=0:hudreset,hudx=4,hudy=8,hudsizex=16,hudsizey=16,hudimage=,hudtype=1,hudmake=numeric
;state=0:hudreset,hudx=15,hudy=5,hudimage=,hudmake=display
;state=0:hudreset,hudx=14,hudy=8,hudsizex=16,hudsizey=16,hudimage=,hudtype=2,hudmake=numeric
;state=0:hudreset,hudx=85,hudy=8,hudimage=gamecore\huds\ammo.tga,hudtype=3,hudmake=status
;state=0:hudreset,hudx=88,hudy=12,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=3,hudmake=numeric

Okay, now go to Files/scriptbank and find the file weapon.fpi. Copy and paste it in the same folder and rename it weapon_hud.fpi. Open it up in notepad. Now paste the following code into it:

;Artificial Intelligence Script

;Header

desc = Weapon Pickup

;Triggers

:state=0:hudreset,hudx=4,hudy=8,hudsizex=16,hudsizey=16,hudimage=,hudtype=1,hudmake=numeric
:state=0:hudreset,hudx=15,hudy=5,hudimage=,hudmake=display
:state=0:hudreset,hudx=14,hudy=8,hudsizex=16,hudsizey=16,hudimage=,hudtype=2,hudmake=numeric
:state=0:hudreset,hudx=85,hudy=8,hudimage=gamecore\huds\ammo.tga,hudtype=3,hudmake=status
:state=0:hudreset,hudx=88,hudy=12,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=3,hudmake=numeric
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupaweapon.tga,hudname=weaponprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt
;state=2:state=3,playerdrop,colon,plrsound=audiobank\items\pickup.wav
:state=3,plrdistfurther=65:state=10

;End of Script

Save it. Place your weapon into the map editor. Right click on it, and change the main script to the new script you just created (weapon_hud.fpi) and give it a test. I don't know whether or not this will work, but it should do in theory because the lives, ammo, and health won't initially run due to being commented out in setuplevel but then loaded once the weapon is picked up.

If you have any more problems let me know.


THE ONLY WAY TO STAY OUT OF IGNORANCE IS TO KEEP ASKING
Iceman
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location:
Posted: 28th Dec 2009 18:31
Thats great Marc

I will give it a go and let you know!

(and yes, I dont know why it was locked either!?! LOL)
The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 28th Dec 2009 23:18
Script requests isent allowed(i think).








-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
PW Productions
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 29th Dec 2009 06:01
There's a big sticky by Ply at the top of this board

FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 29th Dec 2009 12:45
Quote: "Iceman, I don't know why your thread was locked but I'll help you anyway."


Probably because it was a request.
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 29th Dec 2009 20:27
Oh, I forgot requests weren't allowed


THE ONLY WAY TO STAY OUT OF IGNORANCE IS TO KEEP ASKING
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Dec 2009 22:25 Edited at: 29th Dec 2009 22:25
Requests aren't explicitly allowed on this board for the very reason the sticky was made. If requests are allowed and people actually start to fill these requests, the board will soon become over-run by the request posts. I'm all for helping out now and again, but I would like this board to stay the way it is: as a Script Helping/Sharing board. Not a Script Requesting board.


The one and only,


Iceman
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location:
Posted: 4th Jan 2010 22:29
Sorry for that. I did not know/read that its not ok to request a script. However, in fairness I did say
Quote: "I have looked in the forum for something like this but cannot see anything. I know I can edit the setuplevel.fpi to make it so that nothing at all is shown when the game starts, thats no problem...but to then do a script to show everything after a pick up is something that I need help with."


Yep I did ask if anyone could throw it together for me, but as im sure you can see by the above, I really didnt have a clue how to do it so the idea of someone "helping" me with my script is a bit of a non-starter cos I could not put that kind of script together in the first place! lol

But ok.. I wont post for anyone to make me a script from now on, Ill just post my scripts for general help.

Login to post a reply

Server time is: 2024-11-25 03:51:51
Your offset time is: 2024-11-25 03:51:51