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 with HUD script

Author
Message
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 28th Dec 2008 15:39
So i got a HUD display script

+ Code Snippet

;Artificial Intelligence Script

;Header
desc = game conversation

;walk up to a character and he will display a messages. when the user presses enter the next message will be shown

;when the user presses enter once more, the last message will display.

;sounds come after pressing enter

;Triggers

:state=0:hudreset,hudx=50,hudy=50,hudimagefine=C:\Program Files\The Game Creators\FPS Creator X10\Files\HUDS\Mike_Start_1.png, hudname=talk1,hudhide=1,hudmake=display

:state=0:hudreset,hudx=50,hudy=50,hudimagefine=C:\Program Files\The Game Creators\FPS Creator X10\Files\HUDS\Sara_WaitingRoom_1.png, hudname=talk2,hudhide=1,hudmake=display

:state=35,timergreater=500:state=2

:state=2,plrdistfurther=60:state=10

;End of Script



Is this becouse i use .PNG format???


When im done with the script,,, how do i make so the character uses it? The character i walk into?


I USE FPSCx10

Love FPS Creator x10
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Dec 2008 23:28
your missing like half of the script tell me what you want it to do (explain in more depth) and i can help more.

]
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 00:09 Edited at: 29th Dec 2008 00:09
I want so when i go forward to the NPC it comes up a text (the npc talks) and when press ENTER the second message comes up. You know what i mean?

I want a talking NPC

Love FPS Creator x10
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 29th Dec 2008 04:14 Edited at: 29th Dec 2008 05:01
EDIT: ok after a little while of scripting i have finished your script. it works just as you want it to. Here you go








ok can you give me the hud locations and i can make this possible.

]
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 12:17 Edited at: 29th Dec 2008 12:55
Do you mean where they are???



IT says in my script above.


www.x10community.ath.cx
Pride
16
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 29th Dec 2008 16:20 Edited at: 29th Dec 2008 16:22
Okay, here's your issue:

:state=0:hudreset,hudx=50,hudy=50,hudimagefine=Crogram FilesThe Game CreatorsFPS Creator X10FilesHUDSMike_Start_1.png

What's wrong? You don't have to define the destination like that. FPSC already knows you're looking in the /Files/ directory, so delete the Crogram Filesetc etc and just have it:

HUDMike_Start_1.png

EDIT: Also found more problems. You're telling the script to create a hud and then simultaneously destroy it in the same line... Set the timer for each HUD or define aa button to be pressed to cycle thru the conversation.


NVIDIA GeForce 9800 GT FTW
The MOD GODS have smiled upon me!
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 29th Dec 2008 18:33
here you go.

;Artificial Intelligence Script

;Header

desc = game conversation

;walk up to a character and he will display a messages. when the user presses enter the next message will be shown

;when the user presses enter once more, the last message will display.

;sounds come after pressing enter

;Triggers

:state=0,plrdistwithin=35:hudreset,hudx=50,hudy=50,hudimagefine=HUDSMike_Start_1.png,hudname=talk1,hudshow=talk1,hudmake=display,state=1
:plrdistfurther=35:hudunshow=talk1

:state=1,scancodekeypressed=28:hudreset,hudx=50,hudy=50,hudimagefine=HUDSSara_WaitingRoom_1.png,hudname=talk2,hudunshow=talk1,hudshow=talk2,hudmake=display,timerstart,state=2
:plrdistfurther=35:hudunshow=talk2,state=0

:state=2,timergreater=15000:hudunshow=talk2,state=0

;End of Script

]
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 18:43
thanks really much man!


www.x10community.ath.cx
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 18:44
HUDSMike_Start_1.png ,, for example.... Where does it search for the .png? What folder?


www.x10community.ath.cx
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 29th Dec 2008 18:50
Well fpsc already starts it search in side the files folder so the when i put HUD\etc it searches inside of the hud folder for the . png i asked it to look for.

]
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 18:53
But there is no / after HUDS on the path. Is that correct?


www.x10community.ath.cx
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 18:54
Oh i figured it out thanks really much!


www.x10community.ath.cx
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 18:56
So i put the script as on a cahracters MAIN script?


www.x10community.ath.cx
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 19:02
Shall i put it as main script on the NPC? Couse i did and it still dosent work. Plzz help


www.x10community.ath.cx
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 19:09
Ok i fixed it...
Could you rejust it little?


OK i want to add sound on them to. On every text will be a sound for it. could you add that to the script? they will be in the HUDS folder to.


And btw,,,, can you make so when im done talking to the NPC you cannot talk to him again. plzz that is all i need.


www.x10community.ath.cx
The Next
Web Engineer
16
Years of Service
User Offline
Joined: 3rd Dec 2007
Location: United Kingdom
Posted: 29th Dec 2008 19:51
Can you edit your posts please instead of making new ones all the time gets very annoying.

Can be done not sure how though

Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 29th Dec 2008 19:56
not being able to talk to them will be easy for me the sound might be a little harder but ill try it out. tell me the sounds names so when i give you the script you won't have to change anything.

]
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 29th Dec 2008 20:16
...you're missing the obvious. The Search Button is your friend.

http://forum.thegamecreators.com/?m=forum_view&t=65207&b=23

This has all been discussed before. Browse through the thread, and all of the answers you seek will be revealed...


DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 20:16
this may help you with the sound:





please i really need the script for my game.


www.x10community.ath.cx
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 29th Dec 2008 20:24
ok here you go it plays a sound and what not just how you wanted it. But i couldn't get it so that the script will only work once.





]
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 21:54
Thanks alot. Does it stop so i cant talk to it when i already have?


www.x10community.ath.cx
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 29th Dec 2008 22:23
no thats the thing that i couldn't get to work. sorry

]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Dec 2008 22:27
Change the "state=0" part in the last line to "suspend" or "state=3". That will keep it from repeating.


The one and only,



Click Me, Please!
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 29th Dec 2008 22:43
Will it really? i didn't know that i just thought that it would loop because the plrdistwithin in state=0 but good catch ply.

]
DrSteel
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location: x10community www.x10community.ath.cx
Posted: 29th Dec 2008 23:03
oh okThanks really much hockeykid & Plystire!


www.x10community.ath.cx

Login to post a reply

Server time is: 2024-11-24 16:34:45
Your offset time is: 2024-11-24 16:34:45