wc3edit.net

United Warcraft 3 map hacking!
It is currently April 23rd, 2024, 6:21 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: unit type (or)
PostPosted: November 28th, 2013, 4:19 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
i'm making a trigger which move unit to another region when a unit enters the region, but i want to allow only 2 unit types to move to that region, this is the condition i used, but only unit type Hpal move to that region when enter the region i specified, unit type H016 does not, am i doing anything wrong? please correct me. thanks in advance.

Code:
if(not((GetUnitTypeId(GetTriggerUnit())=='Hpal'))or((GetUnitTypeId(GetTriggerUnit())=='H016')))then
return false
endif
return true


Last edited by JustANewbie on November 28th, 2013, 5:12 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: unit type (or)
PostPosted: November 28th, 2013, 4:52 am 
Offline
Forum Addict

Joined: February 25th, 2011, 3:16 am
Posts: 462
Location: Unknown
Code:
    if ( not GetBooleanOr( ( GetUnitTypeId(GetEnteringUnit()) == 'Hpal' ), ( GetUnitTypeId(GetEnteringUnit()) == 'H016' ) ) ) then
        return false
    endif
    return true

try this


Top
 Profile  
 
 Post subject: Re: unit type (or)
PostPosted: November 28th, 2013, 5:13 am 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 551
it works! thank you very much


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)