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 / Need help combining two simple scripts together

Author
Message
Jonez Games
14
Years of Service
User Offline
Joined: 19th Feb 2010
Location: Finland
Posted: 28th Apr 2011 19:33 Edited at: 28th Apr 2011 19:58
So I tried combinig these two simple scripts togeter, but managed to mess up the whole thing.

Here are the scipts:

Battery for flash light:



And pick up script:



So what I wanted was that you need to press E to pick up the battery, not the automatic pick up like it is as default. It would be to annoying in the game as you accidentally pick up and waste battery when it's already full.

If someone is interested to help me combining these scripts like you need to push a button and it would still work as intented i would be more than happy. And of course get your name in the credits in Flashlight field.

Oh, and if the original Flashlight script is needet, here it is:



Thanks

Jonez

Jonez Games
14
Years of Service
User Offline
Joined: 19th Feb 2010
Location: Finland
Posted: 28th Apr 2011 20:11 Edited at: 28th Apr 2011 20:59
Also, it seems that dynamic lights like: flickering light, candle, ect. messes up the flashlight. Is there a way to solve this problem?

Gencheff
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 28th Apr 2011 22:06
Try this (I might have screwed up somewhere)

Quote: ";Artificial Intelligence Script

;battery for Flahlight script

;Header

desc = battery for flashlight

;Triggers

:state=0,always:globalvar=90
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudsize=40,hudtext= pick up "E",hudname=Coltprompt,hudhide=1,hudmake=display,state=10

:state=10,plrdistwithin=40:setvar=23,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=itemprompt,hudfadeout=itemprompt,hudshow=coltprompt,state=12
:state=12:rundecal=5
:state=12,plrdistwithin=40:hudshow=coltprompt
:state=12,plrdistfurther=40:hudunshow=coltprompt

:state=12,scancodekeypressed=18:hudunshow=coltprompt,playertake,coloff,rundecal=-1,plrsound=audiobankitemspickupweapon.wav,state=14"



PC Specs:Windows 7 Ultimate 64-bit,Intel Core i7 960 @ 3.20GHz,NVIDIA GeForce GTX 480,12GB RAM,2x Western Digital 997GB HDD
Jonez Games
14
Years of Service
User Offline
Joined: 19th Feb 2010
Location: Finland
Posted: 28th Apr 2011 23:00
Quote: "Gencheff"


Hmm. Didn't work. It automaticly picked the battery up and the "pick up "E" text stayed and didn't dissapear at all. Though, the battery worked as intented, but the pick up didn't.

But thank you anyway for trying.

Gencheff
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 29th Apr 2011 00:30
My mistake is on the state=10 line.Remove the playertake,coloff,plrsound,hudshow,hudfadeout commands from that line(leave state=12 and setvar=23)

You should really learn how to script on your own...


PC Specs:Windows 7 Ultimate 64-bit,Intel Core i7 960 @ 3.20GHz,NVIDIA GeForce GTX 480,12GB RAM,2x Western Digital 997GB HDD
Jonez Games
14
Years of Service
User Offline
Joined: 19th Feb 2010
Location: Finland
Posted: 29th Apr 2011 02:03
Gencheff@
Almost works. Now the only issue is that the battery refilles by getting close to it, not needing to pick it up.

Quote: "You should really learn how to script on your own..."

Im learning. Slowly, but still.

And thanks again for your help.

Jcatalfamo
13
Years of Service
User Offline
Joined: 22nd Feb 2011
Location: United States
Posted: 29th Apr 2011 02:19
here ya go:

Jonez Games
14
Years of Service
User Offline
Joined: 19th Feb 2010
Location: Finland
Posted: 29th Apr 2011 02:59
Jcatalfamo@

looks like it works perfectly now.

Many thanks to both of you

Jonez

Login to post a reply

Server time is: 2024-11-24 09:06:15
Your offset time is: 2024-11-24 09:06:15