• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Mounts and Inventory

Status
Not open for further replies.
Level 1
Joined
Jun 25, 2008
Messages
4
I'm working on a set of Object data and triggers that allow units that could realistically carry at least one other person (Such as any type of dragon for example. Each race would get different set ups, hopefully balanced.

That part worked out fine, since I created custom storage abilities for each amount (1 Slot, 2 Slot, 3 Slot, 4 Slot, 5 Slot, 6 Slot). I added the appropriate ones to the units I believed could carry other units.

Now, I can't figure out how to allow the units in storage to fire out of it. The best way to describe it is that it's something similar to the hippogryph/hippogryph Rider


Unfortunately, I'm not good enough with modeling to make distinct models for each possible variation, :sad: so I left that part alone.

How do I add the attack of a unit in the cargo to the unit transporting it?
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
I don't really understand what you're trying to say, but i think it's like this:

You've created a unit with cargo, so that other units may "enter" it like with a transport ship, and now you want to give the carrying unit the attack of the carried unit like with the hippogryph rider?

This is impossible the way you've made it i'm afraid. Just use Mount Hippogryph instead...
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
I know a way but its little fishy
you need a way to detect when someone gets out from a transporter
I think Unit Enters map does that

Well
When someone enters a cargo
create an invisible copy of that unit
and move it on cargo on every second
dont know if it will interrupt attack
so that invisible copy will attack and it will look like cargo is attacking
when someone gets out
remove its invisible copy
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
First of all, the damage and so will not show in this case, and second of all if it's going to be in GUI, the move unit instantly will interrupt orders, meaning it cannot attack. Plus you cannot tell your unit to attack a unit directly.

Try making a fusion system, with an targeted ability that u uses at another unit, and then make a whole lot of if/then/else's where you check which unit type it is, removes the both units and creates a new unit there. that unit can have a dummy ability specific for that unit that disassembles it into the two former units again.
 
Level 1
Joined
Jun 25, 2008
Messages
4
Well has anyone played any of the BattleshipsXLegends maps? I'm kinda looking for something like that.

Now that I think about it, the way that the items in the item slot of the battleships fire independently of the users control, with their own targeting systems.

In an attempt to try to get something like that, I added a special inventory to each unit that has cargo, with a corresponding amount of inventory slots. Second, I made an item for every type of unit that can be carried (With no properties).

Basically, I have some triggers set so that when a unit with a cargo hold picks up another unit, the corresponding item for the transported unit is added to the inventory of the transport.

The problem I keep running into with that method is the fact that there is no unit-event for a unit unloading, as far as I know of. So while there is a way to add a certain item onto the vehicle, there is no way to make sure to get rid of the right item when the transported unit gets off.


-------------------------

The reason I don't want to use the Mount-Archer function is that it turns the Hippogryph into the Hippogryph Rider (Read: a unit-type change, when I don't want to change the unit-type), thereby screwing around with any triggers that messed around with it. Not only that, but I'm worried about how to keep the attack varied as opposed to only the Archer's attacks.

Thanks for the ideas all of you have given so far, I'll keep trying all of them.

Please let me know if you have any more suggestions.
 
Level 1
Joined
Jun 25, 2008
Messages
4
The only problem I can see with that is the fact that I don't want to unload every unit at once to do it, which is what the "Unload" ability does (as far as I know)

Maybe if when I click on a passenger to unload them individually, it counted as using the "Unload" ability, but I don't know if that's how it works.

I'm going to use your suggestion anyways though, since it would be closer to my objective then what I've been getting, so thanks, Terradont.


Also, one other problem that has come up is how do I work with units and heros that have changing damage stats.

In the case of units, because of their upgrades, I'd have a different item for each level of the unit, such as "Rifleman" (Lvl 1, lvl 2, lvl 3) *Editor Suffix*

Trigger would be something like this (for Rifleman)

Event
Generic Unit is loaded into a transport.
Conditions
Unit-Type of Triggering Unit = Rifleman
Actions
If Refined Gunpowder is Researched = True Then
Create Item *Rifleman (lvl 2)* And Give to Transporting Unit
Else
Do Nothing

And it would be that way for each ranged unit, since melee units don't need to change their stats while mounted.

For Hero's, I'm thinking of storing the current attack values of the hero in a set of variables when it's loaded, and using those values to determine how strong the attack of the hero firing from the mount would be. If there's a JASS way to do this easily, PLEASE LET ME KNOW!
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
Unfortunatley i do not know JASS, but yes, i think it would require JASS.

As for your trigger, i think it looks wierd, like somethings wrong, but i can't see it at the moment. You see, my main computer got a virus last night which prevents it from starting, so i stayed up almost the whole night rying to get rid of it, which i didn't...:cry: So i'm as tired as possible right now.

I'll look at it again when i've slept for real.
 
Status
Not open for further replies.
Top