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 some to explain why a script is not working

Author
Message
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 2nd Mar 2008 07:01
Hi, After reading the sticky scripting turtorial here, I found a dog script that I needed, but I realized that I would have to rewrite it to have it do what I wanted. I want to make a dog start barking when the player gets close,keep barking and move toward the player when they get closer and then attack.


Using the original and the turtorial as a guide, I wrote this script. here is the original and then my attempt.



-----------------------------------------------------------------

;Artificial Intelligence Script
; by xplosys

desc = Dog see and attack

;Triggers

:state=0,plrdistwithin=500:state=1
:state=1,plrdistwithin=300:rotatetoplr,movefore=2,animate=2
:state=1,plrdistwithin=60:sound=audiobank\user\dogbark.wav,rotateplr,animate=1,plraddhealth=-10,state=2
:state=2,plrdistfurther=100:state=1

;End of Script


---------------------------------------------------------------


;Artifical Intelligence Script
; by The Eye of The Storm

desc = Dog barking see and attack

;Triggers

:state=0,plrdistwithin=800:state=1
:state=1,plrdistwithin=500:loopsound=audiobank\user\dogbark.wav,rotateplr,state=2
:state=2,plrdistwithin=400:movefore=2,animate=2,loopsound=audiobank\user\dogbark.wav,state=3
:state=3,plrdistwithin=60:loopsound=audiobank\user\dogbark.wav,animate=1,plraddhealth=-10,state=4
:state=4,plrdistfurther=100:state=2

;End of script



----------------------------------------------------------------
When i load it the dog will not dog, but if i walk up to him I start to loose health.

any ideas?

it's my first script and the learning curve is steep...lol



If I can get this to work, next I want to make a dog that is an ally with the player and comes with him, barking when enemies get near. maby even attacking them.

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 2nd Mar 2008 16:53
Nice to hear you're starting off learning this stuff...

Well, I think the problem may be the part in bold, but there's nothing I can see about this that is really wrong....

Quote: ":state=0,plrdistwithin=800:state=1
:state=1,plrdistwithin=500:loopsound=audiobank\user\dogbark.wav,rotatetoplr,state=2
:state=2,plrdistwithin=400:movefore=2,animate=2,loopsound=audiobank\user\dogbark.wav,state=3
:state=3,plrdistwithin=60:loopsound=audiobank\user\dogbark.wav,animate=1,plraddhealth=-10,state=4
:state=4,plrdistfurther=100:state=2"


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 2nd Mar 2008 20:02
Quote: "When i load it the dog will not dog"


I like that. LOL

Also, loopsound means to continuously play the sound, so the second and third loopsound are redundant. If you want to use loopsound, which you don't need here, then you will also have to include stopsound to make it stop at some point. Unless you want the background music of your game to be dogbark.wav.

Best.

The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 3rd Mar 2008 06:49
Ok so here is the revised version.

;Artifical Intelligence script
; by sungod

desc = Dog barking see and attack

;Triggers

:state=0,plrdistwithin=800:state=1
:state=1,plrdistwithin=500:loopsound=audiobank\user\dogbark.wav,rotatetoplr,state=2
:state=2,plrdistwithin=400:movefore=2,animate=2,stopsound,state=3
:state=3,plrdistwithin=60:,loopsound=audiobank\user\demon growl.wav,animate=1,plraddhealth=-10,state=4
:state=4,plrdistfurther=100:state=2

;End of script



Trying it now.

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 3rd Mar 2008 07:00
sweet, ok the new one almost worked. The sounds worked, but the dog was sortof stuck in the floor. it looked like it was standing in water, only the upper half of the dog was visible and it would turn but not walk around.

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 3rd Mar 2008 07:16
I am so stoked. I love this program. because of it last night i was searching the internet for more and found blender, which is going to take awhile to learn. I got GKt radient and the TCE-MDk so i can one day learn to map and design. I want to one day design a stand alone MOD of Wolf ET for a Sniper game. I have a bunch of friends and we all play true combat elite ver.48 and We all love sniping. So FPS was a logical choice to start out learning before moving on to the really hard stuff.

..and I played the demo for umbra....OMG! that was really cool. The room with the lights was freeky and the audio was awsome, hope they are making a bigger version.



Thanks for all your help and not just writting " read the manual"
THis stuff may be old hat to most of you, but I'm loving every minute of it. It would be funny to see me " woohooing" at 3am because I just figured out how to make somthing work or discovered a whole new thing. makes me feel like learning to surf or skateboard all over again, and that was 15yrs and 30 lbs ago. I always get stoked when I run the test and have to move arould the whole map just to make sure that there is no lagg or missing walls and the all the doors work and ect.

Alot of people dream of being a video game tester...but man they really dont have a clue. After a week of this, I'll play Call of duty 4 and think..." Holy Sh&%" that must have taken forever!

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
The Eye of the Storm
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 3rd Mar 2008 07:18
OK, so i tried setting the dog higher up in the map using page up, but it will take a step forward and then fall into the floor like before...any ideas?

And even in our sleep, pain which cannot forget falls drop by drop upon the heart, until in our own despite, against our will, comes wisdom.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 4th Mar 2008 18:27
Go to the folder where the dog is and find it's .fpe, and set it's OFFSETY to about 30....

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 4th Mar 2008 18:37
Quote: "It would be funny to see me " woohooing" at 3am because I just figured out how to make somthing work or discovered a whole new thing."


Yeah, it has that effect on me too.

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 4th Mar 2008 21:00 Edited at: 6th Mar 2008 05:00
Quote: "OK, so i tried setting the dog higher up in the map using page up, but it will take a step forward and then fall into the floor like before...any ideas?"


....had that problem, too. It's the first bone issue. Adjusting the OFFSETY won't solve it correctly.

Don't have FPSC on this computer, so I can't send the corrected skeleton to you.


-BiteFight.org
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 4th Mar 2008 21:40
I have both Blender and Milkshape. Can either one of those correct the skeleton? If so, please let me know as this will give me a good learning experience using it or them. I have had them for sometime but hadn't learned how to use either one yet.

I first tried importing dog.x into Blender but couldn't get into load. If one who knows that Blender can be used I will work on it.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 4th Mar 2008 22:21 Edited at: 6th Mar 2008 04:59
@Flatlander,

http://forum.thegamecreators.com/?m=forum_view&t=121119&b=33

Scroll down to my post containing the DL. It's The corrected dog skeleton in both Milkshape and FragMOTION formats.

In Milkshape, merge the new skeleton, and replace the old one. You should be good to go after that...

Thanks,

Seth Black


-BiteFight.org

Login to post a reply

Server time is: 2024-11-24 06:35:38
Your offset time is: 2024-11-24 06:35:38