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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline OmegaForce  
#1 Posted : Tuesday, October 31, 2006 9:07:55 AM(UTC)
OmegaForce
Private
Joined: 10/29/2006(UTC)
Posts: 3

I started doing maps for Command and Conquer: Generals : Zero Hour. And am currently working on a "king of the hill" map. The map is more or less finished but I can't figure out how to write the castle script. here is what I need to know how to do:

1: Castle. I need to be able to script a timer for the castle. It should work: A Player takes control of the castle, timer starts. Player needs to hold the castle for the duration of the timer. If Player fails, the timer restarts, and start over when a player takes the castle again. How would I script this?

2: I also want to script in an attack force that spawns on the map and hunts all the players. How would I script this?

I'm still a little new to the mapping end, but I have figured out most of the scripts needed.

If anyone can help me please reply here. Also I am looking for anyone that would be willing to give me a qick lesson/tips on scripting in the C&C Zero Hour Worldbuilder.

Thanks for your time all.

Edited by moderator Tuesday, October 31, 2006 10:50:29 AM(UTC)  | Reason: Not specified

Sponsor
Offline fleetatks  
#2 Posted : Friday, November 3, 2006 8:28:24 PM(UTC)
fleetatks
Colonel
Joined: 6/2/2006(UTC)
Posts: 961
Location: USA

Was thanked: 3 time(s) in 2 post(s)
1: (the castle part)

This should work: (Make sure these have "deactivate on success is true" NOT checked on all these scripts.)

Make a script that says that If "Player1 captures building" Then "Set flag 'castle is controlled1' to 'true'"

Make another script that says that If "'Castle is controlled1' is 'True'" Then "Set Timer 'Timer castle controlled1' to expire in '###' seconds" and "Enable script 'stop timer1'" and "Set Flag 'castle is controlled2' to 'False'"

Make a script named "stop timer1" and have it disabled. Have its settings be If "Flag named 'Castle is controlled2' is True" Then "timer 'Timer castle controlled1' stops and "Flag named 'Castle is controlled1' is set to 'False'" and "Disable script 'Stop Timer1 (this one)'

Make another script that says that If "Player2 captures building" Then "Set flag 'castle is controlled2' to 'true'"

Make another script that says that If "'Castle is controlled2' is 'True'" Then "Set Timer 'Timer castle controlled2' to expire in '###' seconds" and "Enable script 'stop timer12" and "Set Flag 'castle is controlled1' to 'False'"

Make a script named "stop timer2" and have it disabled. Have its settings be If "Flag named 'Castle is controlled1' is True" Then "timer 'Timer castle controlled2' stops and "Flag named 'Castle is controlled2' is set to 'False'" and "Disable script 'Stop Timer2 (this one)'

EDIT-- Continue with this pattern for more then 2 players, but you will need to add more and more to each script for it to work (Ex: the 1 with disable flag1 will need to say flag1,3,&4)

For quick reference look at this:

flag 1: Says that player1 has flag
flag 2: says that player2 has flag
timer 1: player 1 win
timer 2: player 2 win

1. player captures flag makes flag1 true

2. flag 1 true makes timer 1 expire
" " makes 3 enabled.

3. (D) flag 2 true makes timer 1 stop
" " 3 disabled.
" " flag 1 disabled

4. player2 captures flag makes flag2 true

5. flag 2 true makes timer 2 expire
" " makes 6 enabled.

6. (D) flag 1 true makes timer 2 stop
" " 3 disabled.
" " flag 2 disabled

Some Notes: You will need to figure out a way to set each player to it's own named team. Also: look for a topic that I made with FAQ's on it (should be in mapping & modding) for the 2nd part, or just open an AOD for reference.

Edited by user Friday, November 3, 2006 8:31:46 PM(UTC)  | Reason: Not specified

Email me if you ever need help (edited signature November 6th, 2014)
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.