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.

Author
Message
Shadowed Gamer
17
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 24th Oct 2009 22:52
Right. How do you script so that when you walk up to an NPC (eg. BIll) It asks you to press to use and then a small image will appear saying what he says?

Help me please.
BlackFox
FPSC Master
17
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 25th Oct 2009 01:41 Edited at: 25th Oct 2009 01:44
I have a level I created and as I walk into a room, a guard turns to face me. As I get close, he begins to speak. If I move away and come back, he responds with different text. I move away and come back to him and he responds with a third message.

Here is the code I use for this:



Where you see the huds in the script I am showing-
(ex: hudimagefine=gamecore\huds\ww2_bf\ww2_bf_l6objhud04a.tga)

You just need to modify to your structure and name the hud what you want.

I believe I got this from the following link, so I hope it suits your needs:

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

Hope that helps.

Cheers
Shadowed Gamer
17
Years of Service
User Offline
Joined: 11th Nov 2007
Location:
Posted: 25th Oct 2009 14:32 Edited at: 28th Oct 2009 02:17
Urm... I have a prob with Benjamin A's script. I put it all in (Right I'm sure) But when I attach it to an entity and test it doesn't even activate the script when I get close. Does it have to be in a full made game?

Heres the script
;Artificial Intelligence Script

;Header

desc =Plr In Range Image Appears For Time Repeatable

;Tiggers

:state=0:hudreset,hudx=50,hudy=70,hudimagefine=gamecore\huds\speech.tga,hudname=speech,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=80:timerstart,state=20
:state=20,plrdistwithin=80:hudshow=speech,hudfadeout=speech
:state=20,plrdistwithin=80:rotatetoplr
:state=20,timergreater=6500:timerstart,state=2
:state=2,plrdistfurther=80:state=10

;End of Script

Fixed it now nvm

Login to post a reply

Server time is: 2025-05-26 00:22:59
Your offset time is: 2025-05-26 00:22:59