Home   Help Search Login Register  

Author Topic: join grpNull == No more AI?  (Read 1931 times)

0 Members and 1 Guest are viewing this topic.

CosmicEvo

  • Guest
join grpNull == No more AI?
« on: 21 Sep 2002, 23:06:35 »
HELP!

 I've been trying to create a way to remove units from a players group to allow for leaving them defending an area in a large scale mp game.  But everytime I remove a unit from a group they go into STUPID mode, and no longer target, move, or respond to an enemy, even if the enemy is standing next to them with a gun pointed at their head..  I can't figure out how to make the AI respond again, it's almost as if the disableAI command has been performed.  

PLEASE HELP, I am at a loss on this one...

Cosmic

Offline uiox

  • Contributing Member
  • **
Re:join grpNull == No more AI?
« Reply #1 on: 23 Sep 2002, 00:01:46 »
If you unjoin AI of player AI is disable.
Use create unit.

CosmicEvo

  • Guest
Re:join grpNull == No more AI?
« Reply #2 on: 23 Sep 2002, 00:32:44 »
Yeah,
  I created the units using createunit, but I wanted to be able o disband guys to protect my flanks in the mission I'm working on.   Oh well, I'll just leave that option out for now, I guess....


Cosmic

Chudley

  • Guest
Re:join grpNull == No more AI?
« Reply #3 on: 25 Sep 2002, 02:51:51 »

What to do is - assign them a new group!!

This is how to do it if , for example, you remove 3 men from a group.

newGroup = formLeader unitname1
[unitname2, unitname3] join newGroup


Longjocks

  • Guest
Re:join grpNull == No more AI?
« Reply #4 on: 29 Sep 2002, 09:03:48 »
Just to ask a question to expand on this...

How can you now use this group as normal with their own waypoints, etc, from the time they are separated from the main group?

Chudley

  • Guest
Re:join grpNull == No more AI?
« Reply #5 on: 29 Sep 2002, 21:49:49 »
i.e.

newGroup commandMove getMarkerPos "WP1_NewGroup"

:D

hope this helps, obviously you'll have to place and define the markers first though.

Longjocks

  • Guest
Re:join grpNull == No more AI?
« Reply #6 on: 30 Sep 2002, 13:03:37 »
Understood. Thanks a heap, mate.

CareyBear

  • Guest
Re:join grpNull == No more AI?
« Reply #7 on: 07 Oct 2002, 18:11:38 »
A question re: this...

If I have a group of 4, say unit1 - unit4, can I set them up with different move commands each.. like

#loop
[unit1, unit2] move getmarkerpos "marker1"
[unit3, unit4] move getmarkerpos "marker2"
@ unitready unit1
@ unitready unit3
[unit1, unit2] move getmarkerpos "marker2"
[unit3, unit4] move getmarkerpos "marker1"
@ unitready unit1
@ unitready unit3
goto "loop"

And make a psuedo-synched patrol loop? I want some small patrols, but I want to keep the number of groups as low as possible & don't really mind if there's scripting overhead to do it.

So, will this work, or will they keep coming back into formation all the time?

Bremmer

  • Guest
Re:join grpNull == No more AI?
« Reply #8 on: 07 Oct 2002, 18:40:23 »
The Move command effectively creates a new move waypoint that the whole group will want to go to, so this wont really work.

DoMove is a whole different story, and only applies to the units you specify. Therefore you could change your script to ...


#loop
"_x domove getmarkerpos ""marker1""" foreach [unit1, unit2]
"_x domove getmarkerpos ""marker2""" foreach [unit3, unit4]
@ unitready unit1
@ unitready unit3
"_x domove getmarkerpos ""marker2""" foreach [unit1, unit2]
"_x domove getmarkerpos ""marker1""" foreach [unit3, unit4]
@ unitready unit1
@ unitready unit3
goto "loop"


... it might just work.

 :)

CareyBear

  • Guest
Re:join grpNull == No more AI?
« Reply #9 on: 07 Oct 2002, 19:44:39 »
WhooHOO! Sweeeeeeet....

Actually... It works perfectly.

CosmicEvo

  • Guest
Re:join grpNull == No more AI?
« Reply #10 on: 09 Oct 2002, 01:20:36 »

What to do is - assign them a new group!!

This is how to do it if , for example, you remove 3 men from a group.

newGroup = formLeader unitname1
[unitname2, unitname3] join newGroup



Thanks,

    That would be perfect if I could get the join function to work in MP.  Unfortunately it doesn't seem to allow anyone other then the server to use the join command.  And furthermore, if I create a server/client setup to work around, it still won't switch to another group.   :(  Oh well, so much for '2ndary group converge on location'...  

Maybe someone knows how to get around this "bug" in the MP coding?  If so, any suggestions would be appreciated...

Cosmic