• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Change Corpse Type

Status
Not open for further replies.
Level 3
Joined
May 17, 2008
Messages
45
Hey, couldn't find this anywhere.
What I want to do, is to modify corpses. Case in point: Vegetarian Corpses.

I made a unit called "Mushroom", that on death is supposed to leave a fermented mushroom. These fermented mushrooms can be eaten by Vegetarian animals, such as Stags or feminists. The cannibalism skill is supposed to regenerate Mana instead of health (Mana is the hunger, has a negative regeneration).

Problem: I can't find a way to change a units corpse type or model, or even make new corpse types. Would be amazing if you could help!
 
Level 14
Joined
Jul 12, 2011
Messages
1,370
The only way to change the corpse is to edit the model's decay(or somehting like that) animation.
However, you can also hide the unit after his death animation and change it to the models you want.

Example.
A footman dies.
Wait some seconds until he falls in the ground.
Hide the unit and create a dummy unit that would be a dead footman with blood on his armor or a rusty armor e.t.c.:wink:


Edit:
Maker is so fast!!!!
 
Level 3
Joined
May 17, 2008
Messages
45
hmmm thanks guys, very helpful. And how can I make a modified graveyard (=oasis) that spawns those fermented mushrooms for deers to eat?
 
Level 3
Joined
May 17, 2008
Messages
45
I already thought of that, but if the food source is there from the beginning and will stay there forever, it will overflood the game with mushrooms, because you can't set a limit, right?
 
Level 14
Joined
Jul 12, 2011
Messages
1,370
Here's an old trigger of mine:
  • Spawn in Region 015
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in SkeletalSmallMinionsReg15) Less than 7
        • Then - Actions
          • Unit - Create 1 Skeletal Minnion (1) for Neutral Hostile at (Random point in Region 015 <gen>) facing (Random angle) degrees
          • Unit Group - Add (Last created unit) to SkeletalSmallMinionsReg15
        • Else - Actions
  • Region 015 conditions
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in SkeletalSmallMinionsReg15) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from SkeletalSmallMinionsReg15
Edit it a bit and will be ok
it leaks points.http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/ make sure you fix them
SkeletalSmallMinionsReg15 is a unit group
 
Level 3
Joined
May 17, 2008
Messages
45
Okay, thanks destroyer!
Will work great.
Next question: How can I change the target of cannibalism to just one single unit type (equals Mushroom). The Mana regeneration instead of health will work just fine by triggers, but the targeting is causing me some trouble..
 
Level 3
Joined
May 17, 2008
Messages
45
Hmmm.. that would catch the unit in a vicious loop of eating stones, since I'm trying to create a whole eco-system of triggered eating habits.
Another idea: Can I use a channeling ability, such as mana or life steal, and make the deer target only doodads of the type of "EatableMushroom"?
Edit: I would know how to build this trigger, but I'm not sure if it would make for complications
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You know you can use Unit-type Comparison in the Conditions, right ?
Use this to tackle the problem.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Target unit of ability being cast)) Equal to Mushroom
    • Then - Actions
      • -------- DO SOMETHING --------
    • Else - Actions
      • Game - Display to (All players) the text: You MUST target Mushroom !
 
Level 3
Joined
May 17, 2008
Messages
45
Thanks, I already solved it!
And yeah I know that, but as I said it's part of an AI / self-regulating system. It checks every 0.5 seconds if one of the units' (controlled by neutral passive) mana is 20 or lower, and if it is, it orders the unit to move to one of the feeding zones. Then it gets the order "Cast EatShroom (based on life leech)" (string actually is hex), on "random unit in Unitgroup(Shrooms[1])"
Conditions are:
Mana of picked unit is smaller or equal to 20
Ability being cast is not equal to EatShroom
Picked Unit is in NonWander (group variable, not important here) equals false
Or (multiple) - Unit type comparison.

For some reason, the unit still is stuck in some weird loop.. it vibrates because it tries to target a different shroom every 0.5 seconds. The "Ability being cast is not equal to EatShroom" doesn't work here, as it seems.. Do you know what the problem is?
I'm really desperate.. Got the map to a really good point by now, but I'm caught in a spiral..

Edit: One day I will have to figure out how to write those fancy triggers on Hive..
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
For some reason, the unit still is stuck in some weird loop.. it vibrates because it tries to target a different shroom every 0.5 seconds. The "Ability being cast is not equal to EatShroom" doesn't work here, as it seems.. Do you know what the problem is?
I'm really desperate.. Got the map to a really good point by now, but I'm caught in a spiral..

When you give the order, you can for example add the unit into a unit group. Before giving the order, you check that the unit is not in the group.

When the unit finishes casting, you can remove it from the group.

Edit: One day I will have to figure out how to write those fancy triggers on Hive..

http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/
 
Status
Not open for further replies.
Top