HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

spawning creeps wif treasure...

09-22-2002, 03:08 AM#1
birdfoot
hi dudes, any1 knows any ways 2 spawn creeps tat drop treasure when they die?

i m currently able 2 spawn creeps but they don drop any treasure... :(

oso, if any1 knows how 2 increase lumber 4 the player tat kills the creep, pls tel me... thnx! :)
09-22-2002, 04:43 AM#2
birdfoot
guyz, pls pls pls pls help if u can... cos tis is a realli impt factor 2 the game tat im makin... if the creeps cant drop items on respawn, it'll realli spoil my map real bad... so pls help if u've got n ans or do tel me if it doesnt wrk... thnx! :)
09-22-2002, 04:46 AM#3
Guest
For lumber, do:

Event: When unit owned by player enemy dies
Action: Add owner of killing unit player's lumber to +75

Not sure on items...

You could do this though:

Make integer variable called ITEMS

Trigger1:
Event: Every 1.25 seconds of gametime
Action: Set ITEMS to random number between 1-3
Trigger2: When unit owned by player enemy dies
Action: If ITEMS=1 then create 1 potion by killed unit else do nothing
If ITEMS=2 then create 1 attack claws by killed unit else do nothing
If ITEMS=3 then create 1 scroll of town portal by killed unit else do nothing

There, tell me if u need more help.
09-22-2002, 04:49 AM#4
birdfoot
thnx!! il go try tat straight away! :)
09-22-2002, 05:48 AM#5
birdfoot
the trig 4 the lumber definitely wrks! :) thnx... i've yet 2 try out the item trig cos im trying out a better way 2 spawn my creeps... cant it wrking tho... :( stil figuring out...
09-22-2002, 07:00 PM#6
Guest
Quote:
Originally posted by random157


Make integer variable called ITEMS

Trigger1:
Event: Every 1.25 seconds of gametime
Action: Set ITEMS to random number between 1-3
Trigger2: When unit owned by player enemy dies
Action: If ITEMS=1 then create 1 potion by killed unit else do nothing
If ITEMS=2 then create 1 attack claws by killed unit else do nothing
If ITEMS=3 then create 1 scroll of town portal by killed unit else do nothing

There, tell me if u need more help.


Why that first trigger? why not using those actions within the second trigger? I don't like the 'every .. seconds' event to much, cos I always believe it will slow things down a bit, since it is activated way too many times.
09-22-2002, 08:36 PM#7
birdfoot
hmmmz... sounds like another method i could try... :)
09-22-2002, 09:40 PM#8
Guest
Quote:
Originally posted by Teup
Why that first trigger? why not using those actions within the second trigger? I don't like the 'every .. seconds' event to much, cos I always believe it will slow things down a bit, since it is activated way too many times.


Eh, periodic events dont lag the game NEARLY as much as people think.
04-18-2004, 08:29 PM#9
lear2000
Hi, Tried your trigger for random items and it works. I have a creep set up to respawn when it dies, only problem was that I couldn't get a Spawned(With triggers) Creep to drop items. I did get the Creep to drop 1 item by doing the Create item for hero trig, then making last created item drop when heroes die. I also, b/c the hero that picks up the item will drop it if he dies, had to make this

set
Events
Unit - A unit owned by Player 2 (Blue) Acquires an item
Conditions
Actions
Item - Make (Item carried by (Triggering unit) in slot 1) Stay with Heroes upon death

So the item stays with the hero and doesn't drop. ill have to repeat that for every inv slot and player on the map.
Your random trigger is just what I was looking for. I could do
Set ITEMS = (Random integer number between 1 and 10)

Then set 1-9 to give a crappy item 90%, and 10 would give a rare item 10%. Recreating the drop of death loot table :/

I tried everything else to make a triggered spawn drop items from the loot table. Created hero with drop table. killed hero and took items. I then used a revive command for the hero, but sadly the drop table only was there for the first hero.
03-11-2005, 11:41 PM#10
HQCosTheta
In addition I've also found that giving an item to a hero emediatly after he dies makes it appear as if the hero dropped that item cause it just lands where he died. I think you might have to make the item droppable so he doesn't take it to his grave...this is very effective if you want the hero to drop powerups!