HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Welcome back! Now... Some questions.

06-21-2007, 12:12 AM#1
n13astra
Finally the site is back!

I have some questions/problems.

I have a spellbook ability in my map. The book contains 11 abilities all based on channel. They are all active at the start at lvl 1 and when used, it fires a trigger which levels the actual ability on the unit. At lvl 10, i disable the spellbook ability to remove it. This is works fine and i have no problems.
Although, here are some things i would like to change but dont know how or if it can be done.
#1
- When the player hits a spell icon in the book to upgrade an ability, it stops their unit. So if it was moving and they lvl up a spellbook ability, the unit will stop. How can i stop this from happening?
#2
- I've used the yellow cross (like the red hero ability cross) for the spellbook. The spellbook is based on a skill points system I created and was wondering if there is any way of displaying the number of skill points a player has on the yellow cross, like what is done for the red cross.
#3
- When the spellbook is opened and the 11 abilities are displayed, the player can upgrade the abilities until they run out of skill points. Currently, if the player runs out of points, the spellbook window remains open, confusing the player. How can I make the spellbook close when the player runs out of skill points?
#4
- Not to do with spell books. I have a group of creeps that players can kill and upon their death one of them drops a random item. How can i make it so instead of the same unit dropping a random item, one of the units in the group drops a random item? This way players don't know which unit will drop the item.

Thanks in advance. Good to see the site back up, I was having withdrawls.
06-21-2007, 12:46 AM#2
Pyrogasm
  1. You can't.
  2. There's no way to do that
  3. Force the player to press the "Escape" key or remove and add the spellbook ability instantly.
  4. Add them to a group at map initialization and then set up triggers like so:
    Trigger:
    Collapse Events
    Map Initialization
    Conditions
    Collapse Actions
    ----- Do whatever you have to do to get all the creeps into your group here-----
    Set YOUR_BOUNTY_UNIT_VARIABLE = (Random unit from (YOUR_GROUP))
    Custom script: call DestroyGroup(udg_YOUR_GROUP)
    Trigger:
    Collapse Events
    Unit - YOUR_BOUNTY_UNIT_VARIABLE dies
    Conditions
    Collapse Actions
    Set TempPoint = (Position of (Triggering Unit))
    Item - Create 1 YOUR ITEM-TYPE at TempPoint
    Custom script: call RemoveLocation(udg_TempPoint)
    Trigger - Turn off (This trigger)
    Just make sure to change the parts of the custom script calls with your variable names to "udg_"+TheNameOfYourVariable.
06-21-2007, 08:23 AM#3
blu_da_noob
That trigger isn't going to work Pyro. You would need to register the event after you set the variable. Still doable in GUI.
06-21-2007, 06:12 PM#4
Pyrogasm
Really? Oh.

In that case...:
Trigger:
Collapse Events
Map Initialization
Conditions
Collapse Actions
----- Do whatever you have to do to get all the creeps into your group here-----
Trigger - Add to YOUR OTHER TRIGGER <gen> the event ((Random unit from (YOUR GROUP)) dies)
Custom script: call DestroyGroup(udg_YOUR_GROUP)
Trigger:
Events
Conditions
Collapse Actions
Set TempPoint = (Position of (Triggering Unit))
Item - Create 1 YOUR ITEM-TYPE at TempPoint
Custom script: call RemoveLocation(udg_TempPoint)
Trigger - Turn off (This trigger)
06-21-2007, 08:04 PM#5
aquilla
#1, try basing them off Berserk or whatever the ability that Troll Berserkers have is called; it does not interrupt orders but I'm not sure how it would behave if you have more than one.

#2, maybe you could use the icon for idle workers instead? Otherwise I'm out of ideas, unless there's a "Hero opens ability-learning-thingy" event

#3, already answered

#4, If I understood you right, make a trigger something like this:

Trigger:
Collapse Events
Unit - A unit dies
Collapse Conditions
Owner of Triggering Unit equal to Neutral Hostile
Custom value of Triggering Unit not equal to 1
Collapse Actions
set Temp = (Number of nearby alive creeps + 1)
Collapse Conditions
Random number between (1 and 100) is less than or equal to (100 / Temp)
Collapse Then
Item - Create an item
Unit - Set the custom value of nearby units to 1; so they won't be able to drop
Else
Example: There are 2 nearby creeps, 100/(2+1) means that the dying creep has a 33.33% chance to drop an item, if it doesn't the next creep will have a 100/(1+1) = 50% chance to drop and the last creep a 100/(0+1) = 100% chance.

If any creep drops an item while there are more nearby creeps, the nearby creeps will have their custom value set to 1 so they can be filtered out.

If creep groups are near each other or can run far a trigger like that might be buggy; I suppose you'd need to the creeps to different groups, use different custom values or something else to distinguish them
06-22-2007, 05:10 AM#6
n13astra
#1, Since im using the "channel" ability with different order id's for each, i didnt think it would work but i tried it anyways. Didn't work.

#2, Yeah, thats a good idea! How do i do that though?

#3, Thanks for the answer, works well.

#4, Used an item group instead without using triggers. Works fine.
06-22-2007, 01:15 PM#7
blu_da_noob
#1: When you mean it 'stops' the units, is your problem with them stopping a second to cast and then continueing to move, or with stopping completely? If it's the latter I'm sure there enough dummy spells to achieve the former effect.
06-22-2007, 01:21 PM#8
n13astra
Stops the unit all together.

If it just paused for a few seconds i wouldnt mind that.
06-22-2007, 01:39 PM#9
blu_da_noob
Ok, well then you can just use some ability which don't have that effect and which can be made to do nothing and be used as dummies. Examples I can think of off hand:
DotC - Roar
MK - Thunder Clap
Archmage - Summon Water Elemental
Farseer - Feral Spirit
TC - Warstomp
Warden - FoK
PotM - Scout (owl thing)
Pitlord - HoT
Firelord - Lava spawn
Beastmaster - All 3 summons

That's 12. There should be even more (most, if not all summon abilities work that way for example). So you base your abilities to learn off those and they won't cancel orders completely.
06-23-2007, 07:07 PM#10
aquilla
#2, make a dummy unit with the hero learn ability as icon, classify it as a worker and then remove everything else about it (abilities - add locust though, model, shadows, etc) then simply create/remove these units as players gain levels or use skill points
06-23-2007, 08:50 PM#11
Dil999
#2 - You could make a dummy unit with the icon of the yellow cross, and then allow your hero to 'sell' those units. After this, detect when one of those units is bought, remove it, add the actual spellbook ability to the hero, select the hero, force the hero to use the spellbook. You could then change the number by changing the number of units the hero has in stock.