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
Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 15th Sep 2014 00:41
Hi, Anthony here again, I'm making a new version to my game, and I'm having a major scrip problem...

;Artificial Intelligence Script

;Header

desc = Hunt And Pace Waypoints

;Triggers

:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:nearactivatable=0:settarget,activatetarget=2

:state=0:state=1
:state=1,plrcanbeseen=30:settarget,state=2
:state=1,random=20:rotateheadrandom=65
:state=1,random=60:rotatetoplr
:state=1,shotdamage=10:settarget,waypointstop,animate=1,rotatetotarget,resethead,state=4
:state=1,noiseheard=5:rotateheadrandom=85

:state=2:waypointstop,rotatetoplr,state=3,plraddhealth-9999
:state=3:animate=1,waypointstart,state=0

:state=4,plrcanbeseen=46:settarget,state=2
:state=4,random=20:animate=2,waypointstart,state=1

;End of Script

The entity that I am using does lock onto the player, but doesn't react like it should such as following the routes, or player, and attacking the player when in sight, Is there something I'm not seeing here...

Anthony Gonzales
Mriganka
9
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 16th Sep 2014 15:42
I think you forgot to put plraddhealth=-9999 in the fourth last statement. Also, can you explain me the command plrcanbeseen=46? I usually use it for 0 and 1, like in the binary system.

And also I am a newbie, so please forgive me if any mistake has been done above by me.

Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 19th Sep 2014 03:12
What I mean is that if the entity is in range of 46, the entity will lock onto the player and then start following the player and attacking the player. Or do I use a different state for that???

Anthony Gonzales
Mriganka
9
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 19th Sep 2014 16:49 Edited at: 19th Sep 2014 16:52
I might be wrong. Or maybe I am. But, when we have to put in a condition for the entity to be in its range for an action to be carried out, don't we use the command plrdistwithin = n (where n is a value and 100 values = 1 segment unit). And yes, you might have confused the commands plrcanbeseen and plrdistwithin. Either the player can be seen or cannot be seen in plrcanbeseen command (0,1) while the player may be in any distance for an entity to react to it under the condition when we use the plrdistwithin command. Try something like plrdistwithin = 1000 (10 segments).

Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 19th Sep 2014 19:08
alright I'll try that, Cheers,

Anthony Gonzales
Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 19th Sep 2014 22:13
okay after I tried that, there were differen't results, but, the entity still wasn't able to attack me, but would go off route and follow me... what's your next idea..

Anthony Gonzales
Mriganka
9
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 20th Sep 2014 10:38 Edited at: 20th Sep 2014 10:42
Do you get any damage when the entity is near you? And also, is the entity a character?

If your entity is not a character try putting the command ischaracter = 1 (in the .fpe file) and see what are the animation frames. Although I do not have much knowledge regarding this, I read somewhere that FPSC follows a 25 fps keyframe animation or something. If you have the second version of the community FPSC guide, there is a section where you will see the various animation frames for different animations. Each has a name on animn=startframe,endframe (where n is the number of marking the animation with a specific purpose). You can also open the .fpe files to see how they are listed. Because of my explanation, you may get confused, so, in the reply post you can bombard me the question.

If you want to get an easier environment while scripting, try FPIEditpad by F l a t l a n d e r.

But yes, do you get damaged when the entity is near you? That is the main question.

Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 20th Sep 2014 21:00
no, when the entity (is a character) follow's me off route to try to attack me, he doesn't cause any damage, (P.S) The model pack I am using is rolfy's spiders... maybe does the entity have bugs in this pack???

Anthony Gonzales
Mriganka
9
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 21st Sep 2014 18:58
You can see the scripts from scriptbank/people/ folder to see what is wrong. And why are you using the 'random' command for? I think that you have applied the wrong syntax for it. I've gotta check it out.

Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 21st Sep 2014 20:05
the random syntax is for if you're not using a route and the entity will move any "random" segments... when the entity collides with another obstacle, the entity will change their "random" route and walk in other directions...

Anthony Gonzales
Meows
12
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 5th Oct 2014 06:12
Suggestion.. FPI EditPad V3.3.95
Send F L A T L A N D E R 33.95 and he sends you a priceless script writing tool called

FPI EditPad V3.3.95
OH wait a second.. that's the version number not a price.. It should be a price as all the questions you asked here would have been answered as you wrote the script using FPI EditPad V3.3.95
Download it here http://forum.thegamecreators.com/?m=forum_view&t=129738&b=23

May I also suggest for your viewing pleasure. You watch a great show mostly written by Ched80.. It's a must see before you die thing.. and you can get it here for FREE>. what a deal. Complete Script Syntax Listhttp://forum.thegamecreators.com/?m=forum_view&t=180924&b=23

Ched80 used to actually write scripts for a small fee. Not sure if he still does.. Pretty busy now I think.

Stealth Sin
10
Years of Service
User Offline
Joined: 18th Nov 2013
Location:
Posted: 26th Oct 2014 03:11
alright I have another question, Im working on a new project, and I have a model I downloaded called ZiZombie, but the animations on it are horrible, I know that in a syntax you have have the entities head twitch, but is their any way to get the arms, legs, neck, or anything spine chilling to try and spice it up a little, while it's running towards you and hacking and slashing on you?

Anthony Gonzales

Login to post a reply

Server time is: 2024-03-29 00:08:18
Your offset time is: 2024-03-29 00:08:18