Posted by: p u l s e - Thursday, July 10, 2008 12:00:35 PM
okay, first of all i would like to thank u for all your help on my map, red canal.
Heres problem:
I am trying to make a capture the flag map, where each team must guard their flag. Once their flag is destroyed they lose, so the must protect it with their life. I have tried many things but i cannont transfer statues or flags to a specific team. Even if i could, i can't even make them targetable. Any help would be appreciated.
Posted by: Drummin - Thursday, July 10, 2008 12:19:11 PM
You can transform just about any unit to a team. In or order to do so, you need to load AI skirmish scripts into your map. See my "Capture The Hill" tutorial. It has the AI Scripts and might also give you some ideas. I believe the AI will attack a flag or civilian unit if it belongs to an enemy. See if you can make the transfer of ownership to the player and work from there.
I would probably use a script like...
*** IF ***
Player '' starting position is 1 .
*** THEN ***
Unit 'Flag1' is transferred to the command of Player ''
Posted by: p u l s e - Saturday, July 12, 2008 5:46:25 AM
Okay heres what i have. i am trying to transfer a gla statue to each player. Why won't this work?
*** IF ***
Player '' has units in area 'Transfer Area 1'.
*** THEN ***
Unit 'Flag 1' is transferred to the command of Player ''
Posted by: krit - Saturday, July 12, 2008 8:34:56 AM
See Section 2 and Section 4 of my [url=http://www.cncgeneralsworld.com/forums/topic.asp?TOPIC_ID=9173]new tutorial.[/url]
Posted by: Drummin - Saturday, July 12, 2008 9:22:28 AM
, if in the PlyrCivilian folder would be player teamcivilian and NOT the Local player.
***
Yes, Krit has some great info regarding making the transfer to the players, so check that out.
I was looking into your idea and found that some units a just not targetable. One unit though that is targetable and would really need to be guarded in a Nuke Test Object.
I put together a two player test map.
You might find some of the scripting helpful.
Note: I've only modified USA for attack priorities and defensive actions.
[b]Download Attachment:[/b] [url=http://www.cncgeneralsworld.com/public/files/Drummin/TwoFlagVersion1.zip][img]http://www.cncgeneralsworld.com/forums/images/icon_paperclip.gif[/img] TwoFlagVersion1.zip[/url]
175.08 KB
Posted by: p u l s e - Saturday, July 12, 2008 6:44:09 PM
thanks krit that actually worked. i was surprised, cause i never saw so many question marks in my life on scripts. and could get your map to load drummin, the scripts wouldnt open. here is my map, i think it turned out pretty good. each person gets one statue, if your statue dies, you lose, or if your destroyed you lose.
[b]Download Attachment:[/b] [url=http://www.cncgeneralsworld.com/public/files/p u l s e/Protect Your Statue-Mini Map {NotDeadYet}.zip][img]http://www.cncgeneralsworld.com/forums/images/icon_paperclip.gif[/img] Protect Your Statue-Mini Map {NotDeadYet}.zip[/url]
16.16 KB
Posted by: krit - Saturday, July 12, 2008 7:05:00 PM
You could still add alot more details and map props in there and maybe make the mountain areas impassable because I could simply place a few Tomahawks up there and already completely own one player...
EDIT: Oh, and one problem with your map: Currently, you have fixed Flag 1 to Player 1, this means that if another player starts at Starting Position 1 and destroys Flag 1, Player 1 will be defeated despite not owning the flag. Same applies to Flag 2, Flag 3 and Flag 4, fixed to Player 2, Player 3 and Player 4, respectively.
Posted by: Drummin - Sunday, July 13, 2008 9:46:45 AM
Hello Pulse and Krit,
I took the liberty of fixing the defeat scripts as you had mentioned Krit. It gave me a change to get to understand this type of scripting better.
[b]Download Attachment:[/b] [url=http://www.cncgeneralsworld.com/public/files/Drummin/Protect Your Statue-Mini Map1.1 {NotDeadYet}.zip][img]http://www.cncgeneralsworld.com/forums/images/icon_paperclip.gif[/img] Protect Your Statue-Mini Map1.1 {NotDeadYet}.zip[/url]
16.3 KB
Posted by: krit - Monday, July 14, 2008 7:57:54 AM
I can't check those scripts right now since I don't have access to WorldBuilder from where I am.
EDIT: Checked it. Yup, that should work correctly for all players.