Home   Help Search Login Register  

Author Topic: AI Manhunt question  (Read 1999 times)

0 Members and 2 Guests are viewing this topic.

Offline Pr0ph3t

  • Members
  • *
Re:AI Manhunt question
« Reply #15 on: 18 Mar 2005, 03:32:09 »
See how far that jeep flew? lol

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:AI Manhunt question
« Reply #16 on: 18 Mar 2005, 03:52:13 »
Jeez, there's nothing like mentioning a lower version to start a debate. Its not even what he came here for.

There is one script which is what you need. I don't remember which but you should be able to find it. Of course there are others but one of them is much simpler to implement.

Good luck with it.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AI Manhunt question
« Reply #17 on: 18 Mar 2005, 09:57:14 »
ARGGHH ! I HATE THIS GOD DANGED INTERFACE !! ANOTHER TEN MINUTES OF TYPING WASTED BECAUSE OF SOME STUPID INTERNAL ERROR !!!!!


Hi prophet dude

(much shorter message follows)

Try the attached script.  It should do everything that you want and more.  It basically sends the AI unit towards your projected position based on your last two known positions.  The update rate depends upon its distance from you, its update accuracy depends upon its knowsAbout status for you.

As the pursuing group closes its range you get clues depending upon how close they are.  You get a crow call at 400m, distant voices at 200m and lod voices at 50m.  It can get quite scary when you get all three all around you !

One caveat ! - One command (setWPPos) apparently requires v.121 to use.  You can either update to this version (not likely, right ?!) or try to code around it using move commands for each group member rather than the setWPPos command for the group as a whole.  Your call.

Good luck with it - I know I have fun with it !



roni

Offline Pr0ph3t

  • Members
  • *
Re:AI Manhunt question
« Reply #18 on: 18 Mar 2005, 15:17:39 »
 :o

Outstanding. Seriously now.

I'm definately going to try and code around the setwpos.. Shouldn't be too much of a hassle.. Its just an extra subroutine no? Maybe a nested loop at most?

Thank you so much man.. That's awesome help

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AI Manhunt question
« Reply #19 on: 18 Mar 2005, 23:04:04 »
Hi pr dude

If you read through the script you'll see that all it does is update the pursuing unit's last waypoint so that it appears on the target unit's projected position - the group then naturally moves to this position.  The lockWP false line makes sure that they never actually satisfy the waypoint so will always keep seaching.

A bit sad now that I think of it . . .  :-[

What you could do isinstead is get rid of all the waypoint stuff and replace it with this -

_x = count _group
#loop
_x = _x - 1
_group select _x doMove _targetExpectedPos
? _ > 0 : got "loop"



that should do the trick, v1.0 certified !

Good luck !



roni

Offline Pr0ph3t

  • Members
  • *
Re:AI Manhunt question
« Reply #20 on: 19 Mar 2005, 04:16:20 »
Nice. You're an awesome help as soon as I get to that segment of my mission I'm testing this

Offline Pr0ph3t

  • Members
  • *
Re:AI Manhunt question
« Reply #21 on: 19 Mar 2005, 04:25:58 »
Nobody found the jeep thing funny :(

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AI Manhunt question
« Reply #22 on: 19 Mar 2005, 11:06:15 »
Hey, I did !

I've been spending the last few days messing around with a script that creates artillery shells wherever your bullets land - lots of random mayhem possibilities there !

NIce work on the distance, now we work on your accuracy  . . . !



roni

Offline Pr0ph3t

  • Members
  • *
Re:AI Manhunt question
« Reply #23 on: 19 Mar 2005, 13:27:01 »
Sounds like you need a NASA mainframe.. Do you know how many bullets fly in my missions? I have a few amphibious assaults.. There would just be explosions everywhere.. I mean there already is but that would make this impossible to play
« Last Edit: 19 Mar 2005, 13:27:25 by Pr0ph3t »

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AI Manhunt question
« Reply #24 on: 20 Mar 2005, 07:53:19 »
Actually, I was just messing around with a "fired" eventHandler and a bullet trapping routine.  I wasn't intending to make an artillery rifle, it just so happened that I found out that I could !

What I was really working on was a script that causes suppression to all units within a given distance of a burst of fire.  I'm looking at capturing every 20th bullet and then working out suppression effects within (say) 20m of where it lands.  My tests so far haven't created any noticable lag but then I've ony been using firefights of a dozen units per side.    :-\



roni

Offline Pr0ph3t

  • Members
  • *
Re:AI Manhunt question
« Reply #25 on: 21 Mar 2005, 03:21:38 »
That sounds really interesting, because in my amphib assault missions I wouldn't mind some heavy suppression to give that pinned to the dirt feel..

But I'm not sure I can do so with 1.0.. However, what about placing some game logics, making them run back and forth and make some of the machine guns to target and fire at them... Wouldn't that create the same effect?

Offline Pr0ph3t

  • Members
  • *
Re:AI Manhunt question
« Reply #26 on: 21 Mar 2005, 03:42:08 »
btw speaking of artillery I'm looking for some nice artillery whistle sounds (.wav prefereably ) you know the whistle that follows the shell? But a nice sharp scary whistle..

On a side note for everyone: In real life, when you can hear the whistle of the shell you're fine. If you can't its because its right on top of you. Just an interesting fact

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AI Manhunt question
« Reply #27 on: 21 Mar 2005, 05:06:19 »
Re: Suppressive fire

The script is going to use a "fired" EH to catch the bullet, then an "Any Present" trigger to create the list of all units in the game.  It will then check out the distance between each of these units and the bullets final impact point - if this is 20m or less then the target unit will be playMoved prone or doMoved 200m away from the firer, with random hold fire and hold move orders thrown in for variety.

Of course the player or AI group leader will be able to override all of this but that will take time.  The idea is to have various units all in various stages of cowering and or fleeing al over the battlefield.

Re: Artillery sounds.

Check out Sounddogs.

http://www.sounddogs.com/start.asp


Just type in your required sound effect (eg - whoosh, zoom, kaboom) or some other word (artillery, shellfire etc) and click on the sound icons for each returned sound.  Unless you pay you can only get short samples but I've never had any problems with that.

The returned files will be in wma format but google around and you should be able to get a freeware wma to wav converter.

cheers



roni


EDIT - fixed typos
« Last Edit: 21 Mar 2005, 05:12:38 by Roni »

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AI Manhunt question
« Reply #28 on: 21 Mar 2005, 05:37:50 »
Re: Suppressive fire

AFAIK this script should end up being v1.0 compatible.  I was also going to create an onMapSingleClick function that would allow the group leader to call suppressive fire on to an area and not just on to an enemy unit.  Unfortunately, this command is NOT v1.0 compatible.    :(

An alternative which uses a lot of trig and a bit of hard work would be to use an addaction that takes the players heading and projects a point out in (say) 20m increments.  Once an enemy was detected (say) 20m from that point a gamelogic would be teleported in to that point and all selected units directed to lay suppressive fire at it.

This SHOULD be v1.0 compatible !    :P

Re: Artillery sounds

I just checked and got some good results using "explosion" and "whoosh".

I have a random barrage script handy so if you want some stray fire to add to your stray sound effects just let me know.

cheers



roni