• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Two simple questions

Status
Not open for further replies.
Level 9
Joined
Mar 10, 2005
Messages
326
How do you make ally properties adjustable in a map (similar to the popular world war III map) where people can easily ally, and unally?

Also, how do you make the +gold text appear on certain buildings that generate income periodically?

Thanks

Edit: mod please move to the world edit help zone, iunno how it got here.....
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Gold text like this:

  • Actions
    • Floating Text - Create floating text that reads (String((*gold amount*))) above (*your unit*) with Z offset 64.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
    • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
    • Floating Text - Change (Last created floating text): Disable permanence
    • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
    • Floating Text - Change the fading age of (Last created floating text) to 1.70 seconds
Adjust the color (RGB values) to yellow perhaps. You can concatenate strings, like "+" "amount of gold" (integer) and " gold". So it looks like

+10 gold

The ally thing can be done like this:

  • Untitled Trigger 097
    • Events
      • Player - Player 1 (Red) types a chat message containing -ally as A substring
      • Player - Player 2 (Blue) types a chat message containing -ally as A substring
      • ...
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -ally
    • Actions
      • Player - Make (Triggering player) treat (Player((Integer((Substring((Entered chat string), 7, 7)))))) as an Ally with shared vision
If player 1 types

-ally 2

he will be allied with player 2. Player 2 does not become an ally of player 1 however, meaning P1 units will not attack P2 units, but P2 units will attack P1 units. P2 need to ally with P1 too.

This will bug with players 10,11 ans 12 BTW, but that's not difficult to fix. You may also want to display some text message, like "Player x has allied with player y".

And create an unally trigger in the same fashion.
 
Status
Not open for further replies.
Top