nomadian said:Hi. I used this program and firstly "removed useless code"
This still opened in Warcraft editor though
So I then tried "Remove as much WE data as possible" but keep "doodad file"
Having done this everytime I open it world editor it crashes, good. But when I click on the map to host the game it crashes as well.
So firstly what did I do wrong?
Secondly, if this doesn't sufficiently map protect, where can I get one that does?
All I'm looking for is stopping new players who only are able to add tomes. I don't want people changing the map till I've upgraded it more.
Thanks in advance.
masda70 said:I found a strange bug.
I have tested and found out that the following:
return(IsUnitType(unit,UNIT_TYPE_TOWNHALL))
('unit' being anything I'm pretty positive : (GetTriggerUnit(), GetAttacker()...) )
used in a trigger condition function
(
as in the function that should go here:
call TriggerAddCondition(mytrigger,Condition(function mycondition))
)
should not work.
To make it work you need to add "==true", and the trigger actions will run if the condition is met.
If you use something like :
return((mycond1)and(mycond2)and(IsUnitType(unit,UNIT_TYPE_TOWNHALL)))
it might work or not depending on unknown factors.
The problem is that the map optimizer has an option to make the usual condition:
if( not (cond==true) then
return false
endif
return true
more like:
return(cond)
or
return((cond1)and(cond2)....) if there are more conditions.
So basically if you have a map that uses
IsUnitType(unit,UNIT_TYPE_TOWNHALL) in one of the conditions then map optimizer will make it not to work because it will remove the needed "==true".
Obviously it was hard for me to find this out because it doesn't really make sense at all, you can test it if you want but I'm pretty sure you will get the same results as me since I have tried many possible things already.