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 / My AI Script HELP!!!!!

Author
Message
Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 3rd Nov 2007 04:24 Edited at: 3rd Nov 2007 05:30
Hi, I'm makeing a main AI script and I need a little help on it. I want the enamy to see a better gun and run over and take it. I got started on it and this is what I got( I'm Moding the chase script)
So the bad guy see's the weapon,runs over to it ,crouches down to pick it up and uses it on you. I really can't find the command to pick up the weapon.

P.S. I'll keep trying on this to see if I can't finding how to do it, so I don't leave it up to you guys.

If anyone has Xbox live please add me to you're frinds list.
My tag is FruitlessCRUNK, but tell me who you are through a message.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Nov 2007 09:06
Okay, first thing I want to mention is... your second line of code doesn't seem to have an "Action Colon". It only has the "Condition Colon".

Secondly, simply animating the entity will not make them actually MOVE. Gotta keep that in mind.

Okay, since you seem to know a little bit about scripting, I'll give you some hints on this one. I'd like you to actually learn from this and not just have me make it for you.

The command to have an entity PICK UP an item... any item, even a weapon. Or, at least, the closest to it picking up it's own items, is "COLLECTTARGET". This may clue you in to the fact that the entity needs to have the weapon as its "target".

Some other commands that you may find useful are:
"LOOKATTARGET", "MOVETOTARGET", "ROTATETOTARGET".
Also, if the second one doesn't seem to fit your needs there is also the command "RUNFORE". Use the movement commands with your desired animation as well.


Hope those hints will be good enough to get you on the right track.


The one and only,
~PlystirE~

Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 3rd Nov 2007 16:13
WOW thx man ill get right to work on this THANK U VARY MUCH

If anyone has Xbox live please add me to you're frinds list.
My tag is FruitlessCRUNK, but tell me who you are through a message.
Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 3rd Nov 2007 16:51
ok it seems the bad guy just wants to keep shooting me no matter what i put in the code or where

here is the code
now im not saying make me the code( because i want this to be mine) i just want someone to tell me what im doing wrong.
if someone can help i would like that alot

If anyone has Xbox live please add me to you're frinds list.
My tag is FruitlessCRUNK, but tell me who you are through a message.
xjw110x3
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 3rd Nov 2007 19:22
On the last line you wrote:
:state=13:newweaponcanbeseen=1,settarget......

NewWeaponCanBeSeen is a Condition not an Action.
It must appear before the second colon.

So the last line should look like this:
:state=13,newweaponcanbeseen=1:settarget......

In a more natural English form:
(IF State=13 AND NewWeaponCanBeSeen THEN SetTarget......)

I hope this helps...


while(!(succeed=try()));
Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 3rd Nov 2007 20:00
thx man ill work on it

If anyone has Xbox live please add me to you're frinds list.
My tag is FruitlessCRUNK, but tell me who you are through a message.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Nov 2007 06:22
Well, it looks good so far, I just couldn't help but notice that... no where in your script do you tell it to go to state=12... and so state 12 and 13 are never used by the enemy.

Keep going at it, man. You'll get it eventually, just have faith in yourself.


The one and only,
~PlystirE~

Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 7th Nov 2007 01:24
ok dude as soon as i get it(wich i will) ill put it out for dl

If you can't win, cheat. If you can't cheat, quite.
Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 7th Nov 2007 02:21 Edited at: 7th Nov 2007 02:27
OOOO MAN I'm soo close. The bad guy dose the script but there is three problems. He is't holding the gun, the gun is stell there,and he dosen't go to it to pick it up, although he has all the settings of the gun(sound,speed,damage) he isn't doing what I wan't him to do. I'm soo vary close to getting this pan in the neck script down. I just need you're help once more here it is.
I'm not so wored about the holding the gun or the that it's stell there. I'm most wored about getting the bad guy to move to the gun.

If you can't win, cheat. If you can't cheat, quite.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Nov 2007 02:42
1) Save your engien some excess processing by removing ":state=12:state=13" and changing the line above it to read ":state=11:state=13"

2) This line:


Has an extra colon after the "useweapon" action. It should be a comma.

3) Telling your enemy to look at, rotate to, move to, AND collect the target all at the same time will make the enemy pick it up immediately... hence why he doesn't move to the target. You want to wait until he has "REACHed his TARGET" before telling him to pick it up.

4) The "useweapon" action seems a little out of place. Why do you want him to be using a weapon before he has even picked it up?


Perhaps you could split that line of code up into two lines:


And then remove the line:

:state=13:state=1


Let me know how that goes. This AI script is pretty interesting.


The one and only,
~PlystirE~

Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 7th Nov 2007 15:25 Edited at: 7th Nov 2007 15:36
Ok now I'm out of ideas. The bad guy runs to the gun but as soon as he gets there he stop's moveing, but keeps runing so he is runing in place over the gun. I really have no more tricks or ideas.


If you can't win, cheat. If you can't cheat, quite.
xjw110x3
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 7th Nov 2007 16:36
The state=12 line (second line from the bottom) does not have a state=13 Action, so the last line (state=13) never executes.

So, the line should read:
:state=12,newweaponcanbeseen=1:settarget,lookattarget,rotatetotarget,movetotarget,animate=5,state=13

After that, it's all downhill


while(!(succeed=try()));
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Nov 2007 22:38
Read post above.

It's just as he says. If you don't change the state variable to 13, then the line telling your enemy to move to the target will NEVER STOP executing and hell just be told to be in a running animation trying to get to the target, even if he is already there, lol.

I do believe you are just about done with your AI script, my friend.


The one and only,
~PlystirE~

Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 8th Nov 2007 15:40
OK it's FINALLY WORKING. Here is the script for everyone to enjoy. Let me know on this topic that it's going ok , or if somethang isn't working right here it is. You know the drill copy and past to notebook and then to fpscreator.

ENJOY

If you can't win, cheat. If you can't cheat, quite.
xjw110x3
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 8th Nov 2007 16:24
Good job!

(Thanks for the in-script comment)

while(!(succeed=try()));
Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 8th Nov 2007 17:36
No problem let me know if there is any problems.

If you can't win, cheat. If you can't cheat, quite.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Nov 2007 00:46
I knew you could do it! I bet that was one heck of a learning experience, though!

It works very nicely, too. Better than the half-bummed AI I had been using anyway, lol.


The one and only,
~PlystirE~

Fruitless CRUNK
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: DRINKING MY HOT COFFEE =:-)
Posted: 9th Nov 2007 02:28
But what I just found somethang wrong with it. When they go to the gun they sometimes get stuck..... o well it looks like thats not fixable. But thx guys coulden't have done it with out yea. And it was one HELL of a learing experience. But it has helped me ALOT and now I look at other scripts like its nothen.

If you can't win, cheat. If you can't cheat, quite.

Login to post a reply

Server time is: 2024-11-24 01:47:22
Your offset time is: 2024-11-24 01:47:22