Page 1 of 2
Posted: Fri Mar 25, 2005 10:52 am
by Phex
Deleting Units ("reducing units for harder difficulties") via Unit Control does not work on my map. Why?
This is my script:
Code: Select all
legendary? [Test Unit]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Difficulty Equal To
4
Activates on Success
delete legends
}
delete legends [Unit Control]
deactivates_on_trigger
0.00, 0.00
{
Delete Monsters
Link
<delete on legend>
}
<delete on legend>
{
(subj, monster_identifier)
   Â
[here are the monsters identifiers]
}
Thank you for your help!
- Phex.[/color]
Posted: Fri Mar 25, 2005 2:46 pm
by ozone
if you press ctrl F12 before map starts it will turn on the debugger(on if it says so - bottom left of screen)...this way you can look in myth log and see exactly why it isnt working..
Edited By ozone on 1111780027
Posted: Fri Mar 25, 2005 2:58 pm
by teepens
or just add debg, flag (debug flag) to the parameters of your delete monsters CTRL in question and the mythlog will provide all the info you need on just that mapaction.
Posted: Sat Mar 26, 2005 9:14 am
by Phex
The relevant part in the logfile says:
Code: Select all
Starting mesh...
2005-03-26 15:13:03 Â ### MA [tuni] legendary?: Â test action successful
2005-03-26 15:13:03 Â ### MA [tuni] legendary?: Â succeeded
2005-03-26 15:13:03 Â ### MA [tuni] legendary?: Â deactivated
2005-03-26 15:13:03 Â ### MA [ctrl] delete legends: Â succeeded
2005-03-26 15:13:03 Â ### MA [ctrl] delete legends: Â deactivated
Looks like it should work, but it does not work.
Not at all
Any other suggestions?
EDIT: does this action not work for tradeable units maybe?[/color]
Posted: Sat Mar 26, 2005 12:13 pm
by Sam The Butcher
Mb you could have the units become invisible at the start of the game? If you cant use the difficulty level for the trigger to activate the invisible command. MB you could have a unit/units that only appear at certain difficulty levels. Then use a GEOM test for those units. If those units are present. Then the other units dissapear. I don't know for sure if this would work. I am kinda new to scripting, but this is my 1st thought for a solution.
Posted: Sat Mar 26, 2005 12:23 pm
by Phex
The invisible command does not work vor tradable units. some of them are already invisible at the start of the game.
Posted: Sat Mar 26, 2005 1:30 pm
by Sam The Butcher
What you want to do is for a multi player map, have less units for higher difficulty levels? Then the less number of units be what is tradeable?
Posted: Sat Mar 26, 2005 5:58 pm
by Phex
What you want to do is for a multi player map, have less units for higher difficulty levels? Then the less number of units be what is tradeable?
Exactly. Sorry, my question was not very precisely formulated...
Posted: Sat Mar 26, 2005 6:58 pm
by Sam The Butcher
Even if you were able to delete the units wouldn't that happen after the game started. So wouldn't the UT already be set 1st? Before the units could be deleted.
You could MB do it backwards? Have Timid actually = Leg for your map. So that way you get less units on Timid. You could explain that in the maps read me. It prob wouldn't hurt anything since it is a multi map and you dont have scripted units, that would depend on the difficulty setting.
Edited By Sam The Butcher on 1111881533
Posted: Sat Mar 26, 2005 7:51 pm
by Phex
You could MB do it backwards? Have Timid actually = Leg for your map.
This is not an option. I need unit count in both directions (from timid to leg and from leg to timid) getting lesser.
for example:
Simple | Heroic | Legendary
Warriors 4 8 5
Archers 10 5 12
Posted: Mon Mar 28, 2005 10:08 am
by Sam The Butcher
Ok I see now. You have a mix of units. It doesn't increase steady in any direction. Are you wanting all the units to be tradeable? So like in the example a person get get 0 Arcs and more Warrs? Or do you want ppl to have a minimum number of all unit types? I can't tell from your example which units are tradable.
First am I right or wrong about the unit trade being the 1st thing that happens. So that even if units were deleted the unit trade wouldn't reflect that? If that is right heres an idea I have.
If you do want players to have a minimum number of each unit type. You could MB have a core group of units that were tradable. Then other units that players would automatically get depending on the difficulty level.
For example: If you did want players to have a minimum number of each unit type. You could have 5 Arcs always tradeable. Then depending on the difficulty level you would automatically get an additional number of that unit type. Like the traded number +3. Or in your example the core tradeable Arcs is 5. On Simple you get the trade number + 5. On Heroic you get the traded number + 0. On Leg you get +7. You could also MB instead of always having a set number of a unit type. Have units that are only on certain difficulty levels. Then combine that with the auto additional units and get more combos.
If you DO want players to be able to get 0 units of a type, and the above idea wont work. I may have another idea. I have to think it through more to see for sure if it would work. MB this is what you want though. So I'll wait to see if this helps.
Posted: Mon Mar 28, 2005 5:25 pm
by iron
If its a multi map, you should probably check for the Planning time to be finished (Netgame Time action) before deleting the units. Unit trading causes units to be removed and recreated, which would probably mess with your script as it currently stands.
To avoid having the players get overly confused, mb make the units teleport to invisible before deleting them. Also to avoid hearing the Casualties sound, mark them as Uncontrollable in Loathing. Your script can make them controllable via a Unit Control - Receives Unit Control=true/Ignores Unit Control=false - if the game isn't Legendary.
Hope that all makes sense & goodluck
Posted: Tue Mar 29, 2005 12:57 am
by Phex
If you do want players to have a minimum number of each unit type. You could MB have a core group of units that were tradable. Then other units that players would automatically get depending on the difficulty level.
Good idea, but not possible . I already reached the monster type limit and cannot add any additional unit types. Some of the unit count is also zero on some difficulties.
If its a multi map, you should probably check for the Planning time to be finished (Netgame Time action) before deleting the units.
When I wait for the planning time to be finished before deleting the units, then the player is able to trade the units that are supposed to be deleted. When I delete them after the trading phase, some players will lose units, some wont, which is not fair. Its required that the units are deleted/killed/teleported away/whatever before the planning time calculates all the tradeable units.
Posted: Tue Mar 29, 2005 1:05 am
by Sam The Butcher
You may have to make seperate maps in the plugin. With the different unit sets on each map. Just give them other names. Like I do sometimes Dark, Light, and Heavy. Then theres Slugfest etc.
Posted: Tue Mar 29, 2005 1:23 am
by Phex
Yes, seems so. Altough all "difficulty options" of my map use the same unit concept and just affected the number (so I would not have "dark", "light" etc. but "less units", "more units" etc. which sounds stupid).
Actually I just wondered why this damn script does not work! This would make it a lot easier!