PoLlama Forums  

Go Back   PoLlama Forums > WarCraft > World Editor Help

Reply
 
LinkBack Thread Tools
Old 04-11-2008   #1
 
shocker's Avatar
 
Join Date: Oct 2007
Posts: 1,089
shocker is a jewel in the roughshocker is a jewel in the rough
random reigens

so far i have
Code:
timer
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Countdown Timer - Start timer as a Repeating timer that will expire in 5.00 seconds
        Countdown Timer - Create a timer window for timer with title Spawn Time
        Countdown Timer - Show (Last created timer window)
        Set region[1] = starting spot 1 <gen>
        Set region[2] = starting spot 2 <gen>
        Set region[3] = starting spot 3 <gen>
        Set region[4] = starting spot 4 <gen>
        Set region[5] = starting spot 5 <gen>
        Set region[6] = starting spot 6 <gen>
        Set region[7] = starting spot 7 <gen>
        Set region[8] = starting spot 8 <gen>
        For each (Integer B) from 1 to 8, do (Actions)
            Loop - Actions
                Set random[(Integer B)] = (Random integer number between 1 and 8)
                Unit - Create 1 Rifleman for (Player((Integer B))) at (Center of region[random[(Integer B)]]) facing Default building facing degrees
it spawns the rifleman in a random spot but i want it so it wont spawn in the same spot .
shocker is offline   Reply With Quote
Old 04-12-2008   #2
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: random reigens

Code:
timer
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Countdown Timer - Start timer as a Repeating timer that will expire in 5.00 seconds
        Countdown Timer - Create a timer window for timer with title Spawn Time
        Countdown Timer - Show (Last created timer window)
        Set region[1] = starting spot 1 <gen>
        Set region[2] = starting spot 2 <gen>
        Set region[3] = starting spot 3 <gen>
        Set region[4] = starting spot 4 <gen>
        Set region[5] = starting spot 5 <gen>
        Set region[6] = starting spot 6 <gen>
        Set region[7] = starting spot 7 <gen>
        Set region[8] = starting spot 8 <gen>
        For each (Integer B) from 1 to 8, do (Actions)
            Loop - Actions
                Unit - Create 1 Rifleman for (Player((Integer B))) at (Center of region[(Integer B)]) facing Default building facing degrees
Something like that?

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 04-12-2008   #3
 
shocker's Avatar
 
Join Date: Oct 2007
Posts: 1,089
shocker is a jewel in the roughshocker is a jewel in the rough
Re: random reigens

if you do it like that the spots well be the same every game. i want the spots to be random.

the problem with the my trigger is 2 people might start in the same spot and i dont want that.
shocker is offline   Reply With Quote
Old 04-12-2008   #4
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: random reigens

Code:
timer
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Countdown Timer - Start timer as a Repeating timer that will expire in 5.00 seconds
        Countdown Timer - Create a timer window for timer with title Spawn Time
        Countdown Timer - Show (Last created timer window)
        Set region[1] = starting spot 1 <gen>
        Set region[2] = starting spot 2 <gen>
        Set region[3] = starting spot 3 <gen>
        Set region[4] = starting spot 4 <gen>
        Set region[5] = starting spot 5 <gen>
        Set region[6] = starting spot 6 <gen>
        Set region[7] = starting spot 7 <gen>
        Set region[8] = starting spot 8 <gen>
        For each (Integer B) from 1 to 8, do (Actions)
            Loop - Actions
                For each (Integer A) from 1 to 0, do (Actions)
                    Loop - Actions
                        Set random = (Random integer number between 1 and 8)
                        Set temp_unitgroup = (Units in (region[random]))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Number of units in temp_unitgroup) Greater than 1
                            Then - Actions
                            Else - Actions
                                Unit - Create 1 Rifleman for (Player((Integer B))) at (Center of region[random]) facing Default building facing degrees
                                Custom script:   call DestoryGroup(udg_temp_unitgroup)
                                Custom script:   exitwhen true
"For each (Integer A) from 1 to 0, do (Actions)" - Will make it loop forever.
"Custom script: exitwhen true" - Will exit the loop it's looping in.

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 04-12-2008   #5
 
shocker's Avatar
 
Join Date: Oct 2007
Posts: 1,089
shocker is a jewel in the roughshocker is a jewel in the rough
Re: random reigens

what did i do wrong?
Code:
timer
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Countdown Timer - Start timer as a Repeating timer that will expire in 5.00 seconds
        Countdown Timer - Create a timer window for timer with title Spawn Time
        Countdown Timer - Show (Last created timer window)
        Set region[1] = starting spot 1 <gen>
        Set region[2] = starting spot 2 <gen>
        Set region[3] = starting spot 3 <gen>
        Set region[4] = starting spot 4 <gen>
        Set region[5] = starting spot 5 <gen>
        Set region[6] = starting spot 6 <gen>
        Set region[7] = starting spot 7 <gen>
        Set region[8] = starting spot 8 <gen>
        For each (Integer B) from 1 to 8, do (Actions)
            Loop - Actions
                For each (Integer A) from 1 to 0, do (Actions)
                    Loop - Actions
                        Set random2 = (Random integer number between 1 and 8)
                        Set temp_unitgroup = (Units in region[random2])
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Number of units in temp_unitgroup) Greater than 1
                            Then - Actions
                            Else - Actions
                                Unit - Create 1 Rifleman for (Player((Integer B))) at (Center of region[random2]) facing Default building facing degrees
                                Custom script:   call DestoryGroup (udg_temp_unitgroup)
                                Custom script:   exitwhen true
it gives me a error message about the "call DestoryGroup (udg_temp_unitgroup)" line

Last edited by shocker; 04-12-2008 at 01:07 PM.
shocker is offline   Reply With Quote
Old 04-12-2008   #6
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: random reigens

Quote:
Originally Posted by shocker View Post
what did i do wrong?
it gives me a error message about the "call DestoryGroup (udg_temp_unitgroup)" line
I spelled "DestoryGroup" wrong =|. Try "DestroyGroup".

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 04-12-2008   #7
 
shocker's Avatar
 
Join Date: Oct 2007
Posts: 1,089
shocker is a jewel in the roughshocker is a jewel in the rough
Re: random reigens

well the exitwhen true makes nothing happen so i redid some parts and got this

Code:
timer
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Countdown Timer - Start timer as a Repeating timer that will expire in 5.00 seconds
        Countdown Timer - Create a timer window for timer with title Spawn Time
        Countdown Timer - Show (Last created timer window)
        Set region[1] = starting spot 1 <gen>
        Set region[2] = starting spot 2 <gen>
        Set region[3] = starting spot 3 <gen>
        Set region[4] = starting spot 4 <gen>
        Set region[5] = starting spot 5 <gen>
        Set region[6] = starting spot 6 <gen>
        Set region[7] = starting spot 7 <gen>
        Set region[8] = starting spot 8 <gen>
        For each (Integer B) from 1 to 8, do (Actions)
            Loop - Actions
                For each (Integer A) from loop2[(Integer B)] to 0, do (Actions)
                    Loop - Actions
                        Set starting_spot_player[(Integer B)] = (Random integer number between 1 and 8)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                starting_spot_player[(Integer B)] Not equal to starting_spot_player[((Integer B) - 1)]
                                starting_spot_player[(Integer B)] Not equal to starting_spot_player[((Integer B) - 2)]
                                starting_spot_player[(Integer B)] Not equal to starting_spot_player[((Integer B) - 3)]
                                starting_spot_player[(Integer B)] Not equal to starting_spot_player[((Integer B) - 4)]
                                starting_spot_player[(Integer B)] Not equal to starting_spot_player[((Integer B) - 5)]
                                starting_spot_player[(Integer B)] Not equal to starting_spot_player[((Integer B) - 6)]
                                starting_spot_player[(Integer B)] Not equal to starting_spot_player[((Integer B) - 7)]
                            Then - Actions
                                Unit - Create 1 Rifleman for (Player((Integer B))) at (Center of region[starting_spot_player[(Integer B)]]) facing Default building facing degrees
                                Set loop2[(Integer B)] = 0
                            Else - Actions
it all mosy works but in the game some times it works for player 1,2,3,4 and 5-8 dont get any thing then the next time it might be palyer 1-6 and 7-8 dont spawn a rifleman

at lest now they dont spawn in the same spot
shocker is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Assorted Ideas TheStinger World War Z 1 04-04-2008 10:25 PM
Triggering
Triggering
Need Help with all random hero selection!
Dead_Spirt World Editor Help 0 03-21-2008 03:17 PM
Triggering
Triggering
Need Help with all random hero selection!
Dead_Spirt World Editor Help 0 03-21-2008 03:10 PM
New Hero! Jinn Kinichy Matar Ultimate Footmen 31 12-19-2006 04:02 PM


All times are GMT -5. The time now is 09:03 PM.

A friend of Wc3Happy
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165