(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > World Editor Help Zone

World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README!

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 10-27-2006, 05:46 AM   #1 (permalink)

User
 
Join Date: Oct 2006
Posts: 65

TheSonOfCulture is an unknown quantity at this point (0)


VARIABLES PLEASE

Ok, I'm trying to make an equation for my map (which is uber secret, but you will find out about soon). I have tomes which spawn in the middle every x seconds by having a trigger set a variable between 1 and 3 and selecting a random tome and placing it randomly in the region (this is designed to lure players into the center more). I want to make a formula so that x is scaled according to how many players are in the game (more players = faster tome spawn). When I go to do this in the 'Time - Every x seconds, I cannot seem to use my variable PlayersInGame (interger) in the equation in any way. I tried converting it to real, but couldn't get it to show up there either.

Code:
Init
    Events
        Map initialization
    Conditions
    Actions
        Set PlayersInGame = (Number of players in (All players))
Code:
TomeSpawn
    Events
        Time - Every X seconds of game time
    Conditions
    Actions
        Set WhatTome = (Random integer number between 1 and 3)
        If (WhatTome Equal to 1) then do (Item - Create Tome of Agility at (Random point in TheBowl <gen>)) else do (Do nothing)
        If (WhatTome Equal to 2) then do (Item - Create Tome of Intelligence at (Random point in TheBowl <gen>)) else do (Do nothing)
        If (WhatTome Equal to 3) then do (Item - Create Tome of Strength at (Random point in TheBowl <gen>)) else do (Do nothing)
BTW: If anyone can quickly whip up a formula that spawns tomes at a minimum rate of 1 tome per 45 seconds with 12 players to a maximum of 1 tome per 75 seconds with 1 player (if you can make this two player, you get a cookie, that'd be awesome).

I kind of figured out a formula.
X = 45 + (3 x [PlayersInGame - 2]) Oops, that's backwards.

X = 75 - (3 x [PlayersInGame - 2])
TheSonOfCulture is offline  
Old 10-27-2006, 06:31 AM   #2 (permalink)

User
 
Join Date: Feb 2006
Posts: 480

low-life has little to show at this moment (1)


Actually 75-(players-1)*(75-45)/11

Also, create a timer at map initialization, and use event - timer expires insted
low-life is offline  
Old 10-27-2006, 06:59 AM   #3 (permalink)

User
 
Join Date: Oct 2006
Posts: 65

TheSonOfCulture is an unknown quantity at this point (0)


[quote="low-life"]Actually 75-(players-1)*(75-45)/11

Post deleted.

Ok, so I figured everything else out except your equation. Here's what I get.

75 - ( players - 1 ) * ( 2.73 )

1: 75
2: 72.27 (72)
3: 69.54 (70)
4: 66.81 (67)
5: 64.08 (64)
6: 61.35 (61)
7: 58.62 (59)
8: 55.89 (56)
9: 53.61 (54)
10: 50.43 (50)
11: 47.7 (48|)
12: 44.97 (45)

75 - (3 x [players - 2])

1: 78
2: 75
3: 72
4: 69
5: 66
6: 63
7: 60
8: 57
9: 54
10: 51
11: 48
12: 45

Ah, ha! Now I see why you suggested that. However, note that there will never be only one player. I now see my mistake was in my original question, sorry, and thanks though!
TheSonOfCulture is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not 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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[JASS] Local Handle Variables vs Global Variables 2seksi Triggers & Scripts 2 01-03-2008 11:45 AM
Variables Trigonous World Editor Help Zone 2 10-21-2006 04:55 PM
Variables Ralle Trigger (GUI) Editor Tutorials 0 01-03-2006 04:37 PM
help about variables Dracula Map Development 10 08-06-2005 08:02 AM
Variables Chuckle Brother Map Development 10 03-27-2005 10:34 PM

All times are GMT. The time now is 08:00 AM.






Your link here 
Myspace Layouts | Debt Consolidation | Download Movies | Loan | Credit Card Offers
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle