Help about jass hostfinder

Do you need World Editor help? Ask here!
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.

Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.

Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.

Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
ikillforeyou
Posts: 30
Joined: Sat Nov 22, 2008 4:10 pm

Help about jass hostfinder

Unread post by ikillforeyou »

ok so. i've found a script that finds the host and stores it onto a variable. :

Code: Select all

function GetHost takes nothing returns nothing
    local gamecache g = InitGameCache("Map.w3v")
    call StoreInteger ( g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
    call TriggerSyncStart ()
    call SyncStoredInteger ( g, "Map", "Host" )
    call TriggerSyncReady ()
    set udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
    call FlushGameCache( g )
    set g = null
endfunction
the variable is "Host"
what i need it to do is when the host leaves it selects the new host and gives it the "admin tower"
that action is here is here:
Custom script: call GetHost()
Unit - Change ownership of Admin tower 0002 <gen> to Host and Change color
.
thats all if you can help me i would appreciate it :)
Last edited by 3ICE on Sat Nov 22, 2008 5:12 pm, edited 4 times in total.
Reason: use the [code] tags. Don't disable bbcode

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Help about jass hostfinder

Unread post by 3ICE »

Addt_all Trigger - Add to (This trigger) the event (Player - Host leaves the game)after the ownership changing.
ImageImageImageImageImage
Image
ImageImage

ikillforeyou
Posts: 30
Joined: Sat Nov 22, 2008 4:10 pm

Re: Help about jass hostfinder

Unread post by ikillforeyou »

3ICE wrote:Addt_all Trigger - Add to (This trigger) the event (Player - Host leaves the game)after the ownership changing.
i know but what's all the trigger? like shouldn't i have to do the whole store integer thing again?

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Help about jass hostfinder

Unread post by 3ICE »

By adding an event to (This trigger) you make the whole trigger run a second time as soon as the original host left.
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users and 113 guests