Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   Trigger (GUI)/ AI editor Tutorials (http://www.wc3c.net/forumdisplay.php?f=426)
-   -   A Unique Weapons System (http://www.wc3c.net/showthread.php?t=52754)

NuclearMushroom 07-26-2004 01:45 AM

sorry if you already covered this but...

What if you have weapons, shields, and armor.
You can't have Weapons classified as permanent, Armor classified as artifact, shields classified as campaign.

Is there an alternative to figuring out if the item is a sword, or a shield?

logik 07-26-2004 01:20 PM

me personally? i would set up item arrays...

armor ()
wep ()
shield ()

and set the array to how many of each type you have...

and at map initialization you set each item of each type.

Rao Dao Zao 07-26-2004 07:13 PM

Quote:

Originally Posted by NuclearMushroom
You can't have Weapons classified as permanent, Armor classified as artifact, shields classified as campaign.


Why on earth not? It's the easiest way of doing it (as far as I know), and to the best of my knowledge, the item classification stuff has no effect whatsoever on what happens or is displayed in-game. It's just nicer in the editor, and makes weapons systems a lot easier to make :).

NuclearMushroom 07-26-2004 10:40 PM

It would be a pain in the ass to do, tho. Cuz in my map i need:

Weapon -- permanent
Armor -- artifact
Helm -- campaign
Shield -- miscellaneous

At least, i need those, so that would be easy. But if there would be another way to do this, I would make also add boots and gloves to give each slot in my inventory a specific item.

So i will probably just end up switching the conditions to ItemType and have lots of conditions.

EDIT : Would there be a way to detect if the item has a specific ability? Cuz if you can do that you could just give a dummy ability called weapon to all weapons.

Rao Dao Zao 07-27-2004 07:33 PM

Quote:

Originally Posted by NuclearMushroom
It would be a pain in the ass to do, tho. Cuz in my map i need:

Weapon -- permanent
Armor -- artifact
Helm -- campaign
Shield -- miscellaneous

At least, i need those, so that would be easy. But if there would be another way to do this, I would make also add boots and gloves to give each slot in my inventory a specific item.

So i will probably just end up switching the conditions to ItemType and have lots of conditions.

EDIT : Would there be a way to detect if the item has a specific ability? Cuz if you can do that you could just give a dummy ability called weapon to all weapons.


The fact is, having a billion conditions would be so inefficient the computer would try and commit suicide, even if it had twelve tonnes of RAM and a massive processor.
You might be able to try "Item Level," rather than item classification. That way, you can have at least nine or ten types of thing you can only have one of...

MadBagOfHorses 08-26-2004 03:29 AM

Quote:

Originally Posted by logik
me personally? i would set up item arrays...

armor ()
wep ()
shield ()

and set the array to how many of each type you have...

and at map initialization you set each item of each type.

That should WORK! It would simplify the living hell (yes LIVING hell) out of that, and you wouldn't have to change defaultly permanent items over to something else so you could use permanent. I am going to go try this. If I'm lazy then I won't edit this post saying if it does work. If it doesn't work, then I will definatly edit this post saying so.

Thank you all. So, so, much help has come to me through this thread.

-MadBagOfHorses

RemnantZ27 08-26-2004 03:50 AM

Oh my GOD that is too far into the system, it is quite easy to do it MUCH easier.

First, create a trigger with these functions:

Events:
Unit Aquires Item

Conditions:
Item class is Artifact

Actions:
If:
Weapon_Player[player number of owner of hero manipulating item] = true
Then:
Turn off {drop trigger}
Make hero drop item
Turn on {drop trigger}
Game say to player (No more than one item is available for this hero!)
Else:
Set variable Weapon_Player[player number of owner of hero manipulating item] = true

----

That trigger makes it so it is able to pick up the item if the variable is not true, the turn off and on trigger functions make it so the following drop trigger is not enabled so the whole system isn't fucked to hell.

----

Events:
Unit Drops Item

Conditions:
Item is artifact

Actions:
Set variable Weapon_Player[player number of owner of hero manipulating item] = false

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

Those triggers are the basic version of the first one, but so much easier and less complicated, and it's full proof.

Rao Dao Zao 08-26-2004 07:33 PM

Quote:

Originally Posted by Acε
Oh my GOD that is too far into the system, it is quite easy to do it MUCH easier.
...
Those triggers are the basic version of the first one, but so much easier and less complicated, and it's full proof.


This might be a simpler way of doing it, but this will work for only one hero per player. My sytem may be overly complex in places, but it keeps everything organised, and it can be used for any number of heroes... ...

Quote:

That should WORK! It would simplify the living hell (yes LIVING hell) out of that, and you wouldn't have to change defaultly permanent items over to something else so you could use permanent. I am going to go try this. If I'm lazy then I won't edit this post saying if it does work. If it doesn't work, then I will definatly edit this post saying so.

Thank you all. So, so, much help has come to me through this thread.

I keep telling you, it doesn't matter if it's permenant or even power-up! If you're lazy, use "Artefact" as it has only six items by default.

MadBagOfHorses 08-30-2004 01:27 AM

Robe... You are forgetting. In my map I don't want the heroes to be able to have only 1 weapon... But then be able to have any number of armors and shields they want. I need this to be three way. You can only have 1 shield, 1 armor, and 1 weapon. Sorry bud but your way blows for this kind of problem.

Rao Dao Zao 08-30-2004 07:35 PM

Quote:

Originally Posted by MadBagOfHorses
Robe... You are forgetting. In my map I don't want the heroes to be able to have only 1 weapon... But then be able to have any number of armors and shields they want. I need this to be three way. You can only have 1 shield, 1 armor, and 1 weapon. Sorry bud but your way blows for this kind of problem.


Actually, you've not been listening. You can have a sword, shield and armour - just copy the whole lot, and change the "item classification" in each trigger to something different - artefact, permenant and purchasable, say. Then make two extra variables - HeroHasShield and HeroHasArmour, as per the original tutorial, and insert as necessary.

terradax 09-17-2004 08:05 PM

Great work!

but this could be dont if you don't want to make all weapons as artifacts:

change "(Item-class of (Item being manipulated)) Equal to Permanent"

to "(Item-type of (Item being manipulated)) Equal to (Name of Item)".

Could also be used fo several weapons:

"Condition - or (any conditions are true)"
-"(Item-type of (Item being manipulated)) Equal to (Name of Item)"

Slayer-21 09-17-2004 09:18 PM

Does this tutorial include how to change a units weapon?

Rao Dao Zao 09-18-2004 07:15 PM

Quote:

Originally Posted by Slayer-21
Does this tutorial include how to change a units weapon?


Change a unit's weapon in what way? If you mean the weapon model that the unit model holds, then you can go and find Oinkerwinkle's MDL tools to allow you to remove the weapon, and then use special effects with the increase damage ability to add a specific weapon model for each item.

Valdez 09-26-2004 03:51 AM

Quote:

"A unit owned by Player 1 (Red) Acquires an item" (Making sure that Red is the User's colour)
Rather than doing that and having to set it for EVERY single player you could just do this and save space/loading time/and reduce lag.
This is a Generic Unit Event
Event -
A unit aquires an item

PLayer owned you shouldn't need to worry about...

BuRnInSpartan 10-02-2004 03:43 AM

very cool i can use this for my rpg :emote_thumbup2:


All times are GMT. The time now is 06:39 PM.

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services