Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline slird  
#1 Posted : Tuesday, March 11, 2014 1:06:37 AM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
Howdy Gang,
I am having a bit of a dilemma. Ive created a test map to practice my scripting and am coming along pretty well but I have run into a slight problem...
I placed two units on the map american ranger and chinese redguard. I set the redguard as a computer player and created a team for it and then created a script for the team to wander around its current location. However, it does not wander but merely runs in place. Ive tried several different approaches such as placing a waypoint as its home location, etc. but it seems to prefer its jogging in place routine.
Any suggestions?
Sponsor
Offline i^love^mixery  
#2 Posted : Tuesday, March 11, 2014 2:07:21 AM(UTC)
i^love^mixery
Colonel
Joined: 10/13/2008(UTC)
Posts: 782

Thanks: 7 times
Was thanked: 201 time(s) in 147 post(s)
You have to enable the "Deactivate uppon success" option of the wander/movement script.

Otherwise the script will evaluate every frame, causing the units to "move" on the spot.
Offline slird  
#3 Posted : Tuesday, March 11, 2014 12:46:45 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
The 'disable upon success' box is checked.
Do I need to give it a waypoint path to follow?
Or an area for it to wander around in?

Edited by user Tuesday, March 11, 2014 12:55:22 PM(UTC)  | Reason: Posted reply before checking the suggested fix

Offline i^love^mixery  
#4 Posted : Tuesday, March 11, 2014 2:06:21 PM(UTC)
i^love^mixery
Colonel
Joined: 10/13/2008(UTC)
Posts: 782

Thanks: 7 times
Was thanked: 201 time(s) in 147 post(s)
I am not sure, as I don't use that script at all.

You should create a network of interconnected, Bi-Directional waypoints instead and use this script action:
Team -> Move -> Set to follow a waypoint path -- wander.

The result should be much better with that script.
Offline slird  
#5 Posted : Tuesday, March 11, 2014 6:09:43 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
Yes, I have used that script, and it does work except for the fact that while theyre wandering along the path two things happen (or dont happen):
One: The team doesnt follow the entire path, they merely wander between points within the path.
Two: They wont 'hunt' enemy units even with a behavior subscript. Theyll merely shoot and then continue along the path.
The effect I am attempting to achieve is that the enemy unit will wander around its current location until an enemy is sighted at which point the unit, or team, will hunt the enemy unit until 'all clear' occurs, at which point they will continue thier wandering.

Ive seen it done on other maps and have searched endlessly through the scripts to no avail.
I have the hunt script figured out, I am just trying to figure out the wander part, to make them do something other than jog in place, lol. (eg., wander before and after sighting the enemy)

and thankyou for your help, by the way, it is appreciated.
Offline i^love^mixery  
#6 Posted : Wednesday, March 12, 2014 12:47:59 PM(UTC)
i^love^mixery
Colonel
Joined: 10/13/2008(UTC)
Posts: 782

Thanks: 7 times
Was thanked: 201 time(s) in 147 post(s)
If you don't want the units to move back and forward between waypoints then don't make the path Bi-Directional.

See the attached test map for the other stuff you wanted.
File Attachment(s):
hunt wander test.zip (4kb) downloaded 14 time(s).
Offline slird  
#7 Posted : Wednesday, March 12, 2014 2:29:19 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
Thankyou for the test map. And yes, that is almost exactly what Im trying to achieve except for one small detail...
The redguards do not give chase. They merely stick to the path and fire from it as stated in my previous post. I am looking for a more 'natural' behavior effect where they will give chase until 'all clear' has ocurred at which point they will continue thier wander routine. If you have any ideas on that it would be most helpful.
But the intersecting patways is an excellent idea...I would have never thought of that and will definitely be using it, thankyou.
Offline slird  
#8 Posted : Thursday, March 13, 2014 12:12:49 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
For the record, I do believe that I have found a solution.
It is in a map entitled: Guantanamo Bay by Author: Beng.
It involves a waypoint path and series of subroutines.

sub-script 'wander'

***If***
True
***Then***
Have Team '<This Team>' wander along waypoint path 'waypoint path'

sub-script 'enemy seen'

***If***
True
***Then***
Team '<This Team>' executes script 'enemy seen action' sequentially.

sub-script 'enemy seen action'

***If***
True
***Then***
Team '<This Team>' guards for 150 frames.
Have Team '<This Team>' wander along waypoint path 'waypoint path'.
Team '<This Team>' continue thier current action for at least 300 frames.

Sub-script 'hunt'

***If***
True
***Then***
Team '<This Team>' begins hunting.

Then the team behavior was edited as follows:

On create - use sub-script wander'.
On enemy sighted - use sub-script 'hunt'.
On all clear - use sub-script 'wander'.

The only thing I am unable to find is the script that activates the sub-script 'enemy seen'...unless it is just activated automatically, I dont know because it is not in the team behavior script.
And about frames...what are they?
Ill have to figure that out as well.
Offline i^love^mixery  
#9 Posted : Thursday, March 13, 2014 1:07:09 PM(UTC)
i^love^mixery
Colonel
Joined: 10/13/2008(UTC)
Posts: 782

Thanks: 7 times
Was thanked: 201 time(s) in 147 post(s)
Frames are the steps, the game is caclulated in.

By default, one second consists of 30 frames. You can use the slider in the skirmish menu in order to alter this value.

And yes.. Bengs solution seems good to me.
thanks 2 users thanked i^love^mixery for this useful post.
UTD^Force on 3/13/2014(UTC), slird on 3/13/2014(UTC)
Offline slird  
#10 Posted : Thursday, March 13, 2014 1:35:24 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
Excellent. Thankyou for your help, much appreciated.

One other question, if you wouldnt mind...
What is the purpose of creating multiple borders?

Edited by user Thursday, March 13, 2014 2:18:59 PM(UTC)  | Reason: Had another question

Offline Gameanater  
#11 Posted : Thursday, March 13, 2014 8:26:20 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
Originally Posted by: Slird Go to Quoted Post
Excellent. Thankyou for your help, much appreciated.

One other question, if you wouldnt mind...
What is the purpose of creating multiple borders?


Probably to have the ability to expand/shrink the size of the area the player can move his/her units in? Like in that ZH mission with Burton having to blow up a secret lab with an avalanche while racing Black Lotus (mission 3, I believe).
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Offline slird  
#12 Posted : Sunday, March 16, 2014 5:56:59 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
Hmm, something to look into at a later date...sounds a bit too advanced for me yet.
Offline zero hour mad map maker  
#13 Posted : Thursday, March 20, 2014 6:18:56 PM(UTC)
zero hour mad map maker
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 12/27/2013(UTC)
Posts: 681
Canada
Location: MLP

Thanks: 181 times
Was thanked: 143 time(s) in 119 post(s)
Originally Posted by: Slird Go to Quoted Post
Excellent. Thankyou for your help, much appreciated.

One other question, if you wouldnt mind...
What is the purpose of creating multiple borders?



It plays a HUGE role in a cinematic intro. If your intro is in another setting than your mission you will want to change the active border in the map. Your mission map border is orange and the cinematic is green.


So when you begin your intro you'll want to change the active border with this kind of script

*** IF ***
True.
*** THEN ***
Boundary Green becomes the active border.


And then when your cinematic intro comes to an end you just simply use this script

*** IF ***
True.
*** THEN ***
Boundary Orange becomes the active border.

You can also use it in mission maps for different parts to your mission. let's say the 1st part of you mission border is orange, the second green, and the third blue




You can make stuff happen to extend the mission map to different parts.

*** IF ***
Unit Black Lotus has entered area Part 2
*** THEN ***
Boundary Green becomes the active border.

Then,

*** IF ***
Unit Black Lotus has entered area Part 3
*** THEN ***
Boundary Blue becomes the active border.


Hope that helps :D

Edited by user Thursday, March 20, 2014 6:22:37 PM(UTC)  | Reason: Not specified

Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
thanks 1 user thanked zero hour mad map maker for this useful post.
slird on 3/21/2014(UTC)
Offline slird  
#14 Posted : Friday, March 21, 2014 1:37:29 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
Interesting. May have to test it out. Im still a long way from intros and such as of yet, been at this map for weeks and am only half done with the terrain...I have an eye for detail...
Thanks for the info, it does help.
Offline oliver  
#15 Posted : Thursday, May 21, 2015 7:24:30 PM(UTC)
oliver
Major
Joined: 5/21/2015(UTC)
Posts: 107
Portugal

Thanks: 6 times
Was thanked: 19 time(s) in 16 post(s)
Might as well post this here, as I am having the same problem but those things didnt work for me... I created a team inside PlrCivilian named xxx (not really the name, but it shoudl be easie to explain), placed 5 civilian infantry and give them xxx team... then created a waypoint system connected and bidirectional and gave it as label yyy... then in scripts *If* true > have team xxx wander along waypoint path yyy.

Doesnt work as the infantry stays in the same place with their iddle animation... Thanks in advance.
3D/2D Artist
Offline slird  
#16 Posted : Thursday, May 21, 2015 7:53:40 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
Dont know, man. I created a test map as you said and it worked fine.
File Attachment(s):
test1.zip (3kb) downloaded 5 time(s).
Offline oliver  
#17 Posted : Friday, May 22, 2015 6:44:37 AM(UTC)
oliver
Major
Joined: 5/21/2015(UTC)
Posts: 107
Portugal

Thanks: 6 times
Was thanked: 19 time(s) in 16 post(s)
Mine is a skirmish map... Tried it with no players, and it worked, but this is a AOD map for 2 players.. Anyway to make that work in mp skirmish?

Edited by user Friday, May 22, 2015 6:59:59 AM(UTC)  | Reason: Not specified

3D/2D Artist
Offline slird  
#18 Posted : Friday, May 22, 2015 6:04:10 PM(UTC)
slird
Major
Joined: 3/11/2014(UTC)
Posts: 97

Thanks: 7 times
Was thanked: 16 time(s) in 15 post(s)
I got it to work as a named unit.
Is this what youre looking for?
File Attachment(s):
test1 (2).zip (3kb) downloaded 4 time(s).
Offline oliver  
#19 Posted : Saturday, May 23, 2015 6:29:30 AM(UTC)
oliver
Major
Joined: 5/21/2015(UTC)
Posts: 107
Portugal

Thanks: 6 times
Was thanked: 19 time(s) in 16 post(s)
Nope, with starting positions, a normal skirmish map where you can select your starting position... Anyway after some digging I discovered that any units that you place on the map and given a team, will just not respond to it for some odd reason.. Since it's a AOD map I'll just spawn the civilians in the towns, and make them wander following the waypoints, that should work... If not, screw it, this is really just a cosmetical thing to make the map a little more real an more visual pleasant. Thanks anyway!
3D/2D Artist
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.