1.09b Discussion
- Hell_Tempest
- Grandmaster of Grammar
- Posts: 1291
- Joined: Tue Jan 15, 2008 3:31 pm
- Location: Over there...you know, right there...
Re: 1.09b Discussion
Would it be possible so that if you hire a unit when the counter is four, just instantly give them the amount of money they paid for it?
- Rising_Dusk
- Chosen of the Intargweeb
- Posts: 4031
- Joined: Sat Dec 15, 2007 1:50 pm
- Contact:
Re: 1.09b Discussion
It already does that and has forever..
"I'll come to Florida one day and make you look like a damn princess." ~Hep
- SetaSoujirou
- Letter Linguist
- Posts: 614
- Joined: Sun Feb 24, 2008 11:47 pm
Re: 1.09b Discussion
The main concern here is when the UNITS go on CD when someone tells the team to buy out a lane. Then they all go on a rampage and knock out all the units.
A wild §eta has appeared!
*Twinkle* Lv. 1337
No I'm not a troll.
*Twinkle* Lv. 1337
No I'm not a troll.
- Rising_Dusk
- Chosen of the Intargweeb
- Posts: 4031
- Joined: Sat Dec 15, 2007 1:50 pm
- Contact:
Re: 1.09b Discussion
Yes, I spent days of my life trying to work on a fix for that. There just isn't one.
"I'll come to Florida one day and make you look like a damn princess." ~Hep
Re: 1.09b Discussion
Remove control of the structure once it reaches 4 and give control back once it goes down to 3 or lower.
Kinda cheap, but it would work. Would it?
Another idea: when it reaches 4, have the game force the user to select a dummy structure that has no units for sale but has the "number of spawns" icon visible. Anyone else (minus enemies, obviously) clicking on the structure would be redirected to this structure as well. Once it goes back down to 3, function as normal.
You could make this structure a tiny invisible unit that's on top of the main structure or something. Keep the selection circle the same size but make the selection scale for this unit nonexistent if possible so it looks like there was no change in behavior.
Any of those possible?
Kinda cheap, but it would work. Would it?
Another idea: when it reaches 4, have the game force the user to select a dummy structure that has no units for sale but has the "number of spawns" icon visible. Anyone else (minus enemies, obviously) clicking on the structure would be redirected to this structure as well. Once it goes back down to 3, function as normal.
You could make this structure a tiny invisible unit that's on top of the main structure or something. Keep the selection circle the same size but make the selection scale for this unit nonexistent if possible so it looks like there was no change in behavior.
Any of those possible?
- Rising_Dusk
- Chosen of the Intargweeb
- Posts: 4031
- Joined: Sat Dec 15, 2007 1:50 pm
- Contact:
Re: 1.09b Discussion
That's an inelegant solution.Uber Noob wrote:Remove control of the structure once it reaches 4 and give control back once it goes down to 3 or lower.
Kinda cheap, but it would work. Would it?
This could work (still kind of inelegant), but there's a lag between selection and the trigger firing. I could run it on a timer and do a periodic check, but I'm kind of averse to running a 0.033 timer for this sort of thing.Uber Noob wrote:Another idea: when it reaches 4, have the game force the user to select a dummy structure that has no units for sale but has the "number of spawns" icon visible. Anyone else (minus enemies, obviously) clicking on the structure would be redirected to this structure as well. Once it goes back down to 3, function as normal.
Possible? Yeah, elegant? No. That's the real killer for me.Uber Noob wrote:Any of those possible?
"I'll come to Florida one day and make you look like a damn princess." ~Hep
Re: 1.09b Discussion
Are those dummy units (like a mercenary) or items?
If they are items you could give them some requirement, no? Like Ancient of Wonders has Tier 2/3 as requirements to have some items? Just create/destroy requirement for items to be enabled/disabled respectively.
If they are items you could give them some requirement, no? Like Ancient of Wonders has Tier 2/3 as requirements to have some items? Just create/destroy requirement for items to be enabled/disabled respectively.
Those who seek war deserve for the war to find them.
Re: 1.09b Discussion
I actually had a third suggestion, but I didn't post it because I thought it was a bit excessive, but here goes anyway. Maybe it'd be better:
Similar to my second suggestion, however when the main structure reaches 4 spawns, swap it with an identical dummy structure and move the main structure to the middle of nowhere and change the ownership to a different player (14?) so it is not visible and make it invulnerable. The dummy structure will now actually be the 'main' structure, with the same hit points and such. If anyone was attacking/selecting the main structure when it got swapped then they'll be redirected to attack/select the dummy structure.
When the spawn amount goes back down to 3 or lower, swap the dummy structure back with the main structure and reissue the attack orders on everyone that was attacking the dummy structure (if any). Also re-set the HP of the main structure to whatever the dummy structure had.
How about that? Is it possible to make the swap instantaneous so people can't even notice a change?
Similar to my second suggestion, however when the main structure reaches 4 spawns, swap it with an identical dummy structure and move the main structure to the middle of nowhere and change the ownership to a different player (14?) so it is not visible and make it invulnerable. The dummy structure will now actually be the 'main' structure, with the same hit points and such. If anyone was attacking/selecting the main structure when it got swapped then they'll be redirected to attack/select the dummy structure.
When the spawn amount goes back down to 3 or lower, swap the dummy structure back with the main structure and reissue the attack orders on everyone that was attacking the dummy structure (if any). Also re-set the HP of the main structure to whatever the dummy structure had.
How about that? Is it possible to make the swap instantaneous so people can't even notice a change?
Last edited by Uber Noob on Mon Oct 06, 2008 1:16 pm, edited 1 time in total.
Re: 1.09b Discussion
I think he was reffering to it being inelegant. Since it is the easiest solution there is.Uber Noob wrote: How about that? Is it possible to make the swap instantaneous so people can't even notice a change?
Those who seek war deserve for the war to find them.
Re: 1.09b Discussion
This one is a little different. The main structure would be moved to 'nowhere' so there wouldn't have to be periodic triggers for people clicking it. Whoever was already on it would be reissued to select/attack/whatever on the dummy structure.
Example: Player clicks a spawn to buy and that is the 4th spawn... this causes triggers to swap the main structure with a dummy structure and re-issue orders for everyone who was already interacting with the main structure to the dummy structure.
I believe moving units is pretty much instantaneous so you wouldn't see the 'swap' of the structure. It's the same thing with hero deaths, the corpses remain. It's actually a dummy unit of the hero...The dying hero is moved somewhere and a dummy unit playing the hero's death is put in its place.
Example: Player clicks a spawn to buy and that is the 4th spawn... this causes triggers to swap the main structure with a dummy structure and re-issue orders for everyone who was already interacting with the main structure to the dummy structure.
I believe moving units is pretty much instantaneous so you wouldn't see the 'swap' of the structure. It's the same thing with hero deaths, the corpses remain. It's actually a dummy unit of the hero...The dying hero is moved somewhere and a dummy unit playing the hero's death is put in its place.
- Rising_Dusk
- Chosen of the Intargweeb
- Posts: 4031
- Joined: Sat Dec 15, 2007 1:50 pm
- Contact:
Re: 1.09b Discussion
Except that there are 8 independent spawn types you can buy from a place with 8 independent counters for how many are remaining. In order for the counts between the original structure and the dummy to match (ie. elegant solution), you'd need to set them as such. The problem therein is that you cannot within the framework of WC3 detect what the current count left is. Without being able to dynamically test it, there's no way to dynamically set it, and you cannot do this dummy structure replacement method with any degree of elegance.UberNoob wrote:Example: Player clicks a spawn to buy and that is the 4th spawn... this causes triggers to swap the main structure with a dummy structure and re-issue orders for everyone who was already interacting with the main structure to the dummy structure.
I also think it would look rather silly if I just removed the numbers for the dummy structure. The sin of perfection, I guess you'd say.
"I'll come to Florida one day and make you look like a damn princess." ~Hep
Re: 1.09b Discussion
You can't use requirement to disable it like racial shops do?
Those who seek war deserve for the war to find them.
-
- Noobite Warrior
- Posts: 11
- Joined: Tue Sep 30, 2008 4:18 pm
- Location: At my computer, if I'm logged on.
Re: 1.09b Discussion
Code: Select all
library Spawns initializer Init
globals
private constant integer ORDERSPAWNER = 'a010'
private constant integer BANESPAWNER = 'b010'
private player triggerer
private integer startgold
private integer startlumber
private integer OCOUNTER = 0
private integer BCOUNTER = 0
private boolean BANE = null
endglobals
private function Actions takes nothing returns nothing
local Spawns s = Spawns.create()
local unit u = GetSellingUnit()
local unit s = GetSoldUnit()
if BANE = true then
if OCOUNTER > 4 then
if GetUnitTypeId(s) == 'dragon' or GetUnitTypeId(s) == 'golem' then
call AddUnitToStock(u, GetUnitTypeId(s), 0, 1)
call RemoveUnit( GetSoldUnit())
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_GOLD, startgold)
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_LUMBER, startlumber)
endif
call AddUnitToStock(u, GetUnitTypeId(s), 4-OCOUNTER, 4)
call RemoveUnit(GetSoldUnit())
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_GOLD, startgold)
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_LUMBER, startlumber)
endif
call SetUnitOwner(s, GetOwningPlayer(u), true)
endif
if BANE = false then
if OCOUNTER > 4 then
if GetUnitTypeId(s) == 'obliderator' or GetUnitTypeId(s) == 'crag' then
call AddUnitToStock(u, GetUnitTypeId(s), 0, 1)
call RemoveUnit( GetSoldUnit())
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_GOLD, startgold)
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_LUMBER, startlumber)
endif
call AddUnitToStock(u, GetUnitTypeId(s), 4-OCOUNTER, 4)
call RemoveUnit(GetSoldUnit())
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_GOLD, startgold)
call SetPlayerState(triggerer, PLAYER_STATE_RESOURCE_LUMBER, startlumber)
endif
call SetUnitOwner(s, GetOwningPlayer(u), true)
endif
set u = null
set s = null
endfunction
private function Cond takes nothing returns boolean
if GetUnitTypeId( GetSellingUnit()) == ORDERSPAWNER then
set OCOUNTER = OCOUNTER + 1
set BANE = false
return true
elseif GetUnitTypeId( GetSellingUnit()) == BANESPAWNER then
set BCOUNTER = BCOUNTER + 1
set BANE = true
return true
endif
return false
endfunction
private function Safe takes nothing returns boolean
return true
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_SELL, Filter(function Safe))
set triggerer = Player(i)
set startgold = GetPlayerState(triggerer, PLAYER_STATE_RESOURCE_GOLD)
set startlumber = GetPlayerState(triggerer, PLAYER_STATE_RESOURCE_LUMBER)
set i = i + 1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t, Condition( function Cond))
call TriggerAddAction(t, function Actions)
endfunction
endlibrary
¡Yo voy a hacer picadillo!
- Rising_Dusk
- Chosen of the Intargweeb
- Posts: 4031
- Joined: Sat Dec 15, 2007 1:50 pm
- Contact:
Re: 1.09b Discussion
And sustain the integer counts? No.Deschain wrote:You can't use requirement to disable it like racial shops do?
Yes, this works, but it doesn't keep the cooldowns for the units when it restores. That's the problem.T.s.e-kun wrote:Something like this can work? It is mui, even though it has globals. No waits.
"I'll come to Florida one day and make you look like a damn princess." ~Hep
Re: 1.09b Discussion
Just stopping by... been awhile... why isn't 'c' out yet?
-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-