3 BIG Spell ploblems

Level 2
Joined
Aug 29, 2007
Messages
12
Hello, Im new to the forum.

Even though I have some experience with creating custom maps, Im currently working on one that isnt my area of expertise, so I encountered 3 problems, that even though they dont affect the game that much, they make it sorta of less enjoyable. Ok here I am:

- I had to undo the regular victory/defeat conditions, and now had to make my own through triggers, but whatever I do I cant seem to get any player to actually receive a victory message. This map im working on has the same basic mechanic of footman, but with major tweaks, so there could be up to 12players, locked into 4 alliances of 3 players each.

- I would like to make a numerical limit to how many of one class or general type of item the same hero can have, for instance, a hero not being able to have more than 2 permanent damage increasing items, like claws of attack or such.

- My final problem is rather simple, I want four parts of the map to offer no visibility through them. Like if standing on one side of a river, the player cannot see the other side. If possible I would like to be able to do this without decreasing the line of sight of all units or widening the rivers.

Thank you in advance to anyone who can help me with any of these problems.
 
Level 6
Joined
Mar 2, 2006
Messages
306
problem1:
Look at the "Game" section of trigger actions; you will find "Game - Victory" and Game - Defeat" there. Those two actions allow you to enter a custom message that the players will see.

problem2:
  • 1: you detect the "unit acquires an item" event
  • 2: you go through all six item slots and count the "damage items"
  • 3: if count > 2 then Item - Drop (Item being manipulated)
problem3:
there is an invisible doodad called "line of sight blocker" (and also one called "line of sight blocker (large)"). just hit D in the main window to switch to the doodad layer, in the palette open third combo box and choose "pathing blockers". there they are...
 
Level 2
Joined
Aug 29, 2007
Messages
12
1. The problem is the event, I cant get the game to know when to give victory to the alliance that remains when everyone else has been defeated.

2. I tried something like that, but maybe that solution will work, what action do I use for it to count the number of items of the same class?

3. I have used line of sight blockers, but they dont seem to do anything at all, I dont know what the problem is at that point.
 
Level 32
Joined
Oct 23, 2006
Messages
5,299
[off-topic]

  • edge[d1]:

    • + REP!


  • Apeliotes: [self="http://www.hiveworkshop.com/forums/newthread.php?do=newthread&f=360"]
    peonforum.gif
    Very first post(s)? !ntroduce yourself to The Hive![/self]
 
Level 4
Joined
Jul 30, 2007
Messages
79
Problem 1:
If that is the case your conditions would most likely be the problem and to fix that we would need the trigger

Problem 2:
you would have to either set up variables or specific item levels or something else along those lines to as a way to separate each item type

problem 3:
when you use the line if sight blockers use the large and make a line of then 1 space apart in the river itself that should cover that. this will only work in area where you don't want units to be able to cross the river as these blockers are also pathing blockers. ( unless u set up a trigger for the crossing )
 
[off-topic]

Rep for a good post, lol

[on-topic]

1

A team is a force right?, so if there are 2 teams, that makes 2 forces, depending on what you want to do, say all of force 2's units or buildings are gone, then have an event like,

  • Events
    • Unit - A unit dies
and check if that unit belongs to player "Force 2" and check if "Force 2" has any remaining units left, and if not then defeat for all players on "Force 2" Victory for all players on "Force 1"

If u want it dota style, like the "Main Building" of a team dies, then just check when that unit dies using the same event.

2

What i do for things like that is make every "Weapon Type" (gives damage) an Item type of like "Permanent" etc. and then if the hero has 2 "Permanent" items have an |cffff0000If then else multiple|r action

  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Hero manipulating item) has an item of type (Random level -1 (Item-class of (Item being manipulated)) item-type)) Equal to True
      • Then - Actions
        • What ever
      • Else - Actions
        • What ever

3

Line of sight blockers cant have any hole, like a Spot not filled and must be connected to each other like a box

Ex:
oooooo ooooo ooo o oooo no
oooooooooooooooooooooo yes
 
Level 6
Joined
Mar 2, 2006
Messages
306
1. The problem is the event, I cant get the game to know when to give victory to the alliance that remains when everyone else has been defeated.
if you know when a team is defeated, the rest is easy. just maintain "points" for all teams: start at zero; when team 2 (for example) is defeated, add a point to teams 1, 3 and 4; immediately chech each team's points: if a team has 3 points, they won. (by the way, when a team loses, substract 5 from their points so that you can continue adding points to them even after they are defeated)...

2. I tried something like that, but maybe that solution will work, what action do I use for it to count the number of items of the same class?
  • Set TempInt = 0
  • For each (Integer B) from 1 to 6, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Claws of Attack +15) or ((Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Claws of Attack +12) or ((Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Claws of Attack +3)
        • Then - Actions
          • Set TempInt = (TempInt + 1)
        • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • TempInt Greater than 2
    • Then - Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
    • Else - Actions
3. I have used line of sight blockers, but they dont seem to do anything at all, I dont know what the problem is at that point.
they work. did you put them dense enough? make sure that those pink&black cubes are right next to each other (side by side). (hint press "I" inside editor to turn them on/off)

edit: wow, two more combo-posts while i was typing this... well, sorry for any repeated info...
 

Attachments

  • WC3ScrnShot_083007_053650_01.jpg
    WC3ScrnShot_083007_053650_01.jpg
    52.3 KB · Views: 106
Level 32
Joined
Oct 23, 2006
Messages
5,299
well i still have the same 3 problems, so maybe he needs to make another "excellent" post.
Indeed.

:sad:

If you feel it's necessary to "call in the calvary," I would recommend sending a PM to our best trigger and spell editors:
and many others (begging your pardon for omitting you, my friends)... whoever you think can help (to inform them of the existence of these knotty problems and get those cats involved on this issue).
 
Level 2
Joined
Aug 29, 2007
Messages
12
Ok, im trying to figure out whats wrong with this trigger right here:

Code:
Defeat
    Events
        Unit - A unit Dies
    Conditions
        (((Dying unit) is A structure) Equal to True) or ((Unit-type of (Dying unit)) Equal to Wisp)
    Actions
        Player Group - Pick every player in (All allies of (Owner of (Dying unit))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (All units of (Units owned by (Picked player)) are dead) Equal to True
                    Then - Actions
                        Game - Defeat (Picked player) with the message: Defeat!
                        Player Group - Pick every player in (All enemies of (Owner of (Dying unit))) and do (Player - Add 1 to (Picked player) Current lumber)
                    Else - Actions
                        Do nothing

There is no indication in game that it even gets to the then - actions at all.
BTW: All players start with a wisp and when the player is unused or its a computer player, the wisp is killed.

Also, with the line of sight blockers, I cannot seem to put the blocks actually touching each other, and therefore working properly. They are in a line, and the closest I can get them, but no effect.

Thank you for all the help so far.
 
Level 6
Joined
Feb 2, 2005
Messages
205
For Gui Trigger you should use the Trigger Tags

I would do the Trigger like this, not sure if it works no WE in front of me

  • Defeat
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((((Dying unit) is A structure) Equal to True) or ((Unit-type of (Dying unit)) Equal to Wisp)) and
      • (All units of (Owner of (Dying unit)) are dead) Equal to True
    • Actions
      • Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
      • Player Group - Pick every player in (All enemies of (Owner of (Dying unit))) and do (Player - Add 1 to (Picked player) Current lumber)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
If you need to get the LoS blockers closer together, you can try holding Shift while placing them.

Also, do you still need help with the Items, or is that resolved?

Also Also, Godless's trigger leaks a force (Player Group). It's not a huge deal (since, after all, there'll barely be any players losing), but for consistency's sake you may want to deal with the leak.
 
Level 2
Joined
Aug 29, 2007
Messages
12
I think all the problems are resolved at this point, I would like to thank everyone who gave suggestions, there will be a special thanks to all of you in my loading screen.

About the leak, i was wondering if you could elaborate on that
 
Level 4
Joined
Jul 30, 2007
Messages
79
instead of all units dead i find it more reliable to use
number of living units owned by player equal to 0

leaks are things within a trigger that are saved into the game memory and just left there

to many leaks will cause your game to lag and even crash

there are many things that leak within GUI and several ways to handle most of them
Read This for a good list of them and how to fix them

there is also a program called leak check that can help you find these within your map though i do not have a location for that atm
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
To fix the leak;

First, make a global Player Group (lets call it TempForce), then set it to (Enemies of (Owner of (Triggering Unit)))

Then, use that variable in the Pick Every Player in...

Then, after that, write

Custom script: call DestroyForce( udg_TempForce )

Also, use Triggering Unit, not Dying Unit (preferrably)

Also also, I think that the condition leaks. (The All Units are Dead... bit. That uses a Unit Group if I'm not mistaken, which leaks)
 
Top