HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Is there an easier way?

02-28-2005, 06:03 AM#1
Zero
So far, I am making an open RPG map. There is 18 different classes of hero's you can be. Well, there is class specific items in the map. The way I have it currently set up is:

I made a trigger that says "Whenever a hero picks up an item, and the item dosen't work for that class, then drop the item."

This works fine, but is there an easier way?

I mean. Doing it this way, I have to make a new trigger for each item and then for each class. IE:

Warrior - Make trigger that says "If picked up staff, drop item."

It's just a pain in the ass to make a trigger for each single item for each class. Anyone know an easier way?
02-28-2005, 07:21 AM#2
Raptor--
Quote:
Originally Posted by Zero
So far, I am making an open RPG map. There is 18 different classes of hero's you can be. Well, there is class specific items in the map. The way I have it currently set up is:

I made a trigger that says "Whenever a hero picks up an item, and the item dosen't work for that class, then drop the item."

This works fine, but is there an easier way?

I mean. Doing it this way, I have to make a new trigger for each item and then for each class. IE:

Warrior - Make trigger that says "If picked up staff, drop item."

It's just a pain in the ass to make a trigger for each single item for each class. Anyone know an easier way?

mm, personally i linked variables to items using handle-variables (gamecache) (i guess also possible with arrays and indexing) so that when a unit picks the item up it just has to check (if ( manipulateditem.var_bFighterCanUse == true ) then )

in the same manner that (if ( bFighterCanUse[custom value of manipulateditem] == true ) then )

sorry if i didn't make much sense, its late and i don't have time to explain the details of it
02-28-2005, 07:25 AM#3
thedevil
18 class of hero wow so much >_<
U can use class of item as condition to make item drop like this
Event:
A unit accquire an item
Condition:
And all condition equal to true
-Item class of item being manipulate equal to permanent
-Unit type of triggering unit not equal to warrior
Action:
-Game show message for X seconds
-Drop item being manipulate from triggering unit
If i recall right there just 7 class of item in WE so if u have 18 class of hero u will need some variable for more class of item >_<
02-28-2005, 07:36 AM#4
Zero
Quote:
Originally Posted by thedevil
18 class of hero wow so much >_<
U can use class of item as condition to make item drop like this
Event:
A unit accquire an item
Condition:
And all condition equal to true
-Item class of item being manipulate equal to permanent
-Unit type of triggering unit not equal to warrior
Action:
-Game show message for X seconds
-Drop item being manipulate from triggering unit
If i recall right there just 7 class of item in WE so if u have 18 class of hero u will need some variable for more class of item >_<

This would work, but I am allready using item classifications for another set of triggers :\

I am using them for:

Weapon = Permant
Armor = Charged
Shield = Power Up
ETC...

This is to keep hero's picking up two of the same item types. Like two weapons. So, I can't use :\
02-28-2005, 08:05 AM#5
Anitarf
Perhaps you can use some other property of the items to classify them, like item level or hit points. Then you just need a trigger for each hero class (you don't even need that if you arrange the classes in a unit type array, but let's not complicate matters) that checks if the picked up item is class-specific for any other class.
02-28-2005, 09:38 AM#6
Zero
Quote:
Originally Posted by Anitarf
Perhaps you can use some other property of the items to classify them, like item level or hit points. Then you just need a trigger for each hero class (you don't even need that if you arrange the classes in a unit type array, but let's not complicate matters) that checks if the picked up item is class-specific for any other class.

Hmmm. That's a good idea. I will try to work up a trigger system to work that out. Thx :)
02-28-2005, 11:18 AM#7
divine_peon
yah, that is a good idea. i have made one last month (never finished it.) it contains this trigger:

Code:
Event:
pick up item

conditions:
item class is permanent

actions
if item level > unit custom value
then
       drop item
else
       //other triggers go here.

it would work like if you put a wand to level 2 and then set the knight's custom value to 1, he would not wear it. hope it helped.
02-28-2005, 02:20 PM#8
Zero
Quote:
Originally Posted by divine_peon
yah, that is a good idea. i have made one last month (never finished it.) it contains this trigger:

Code:
Event:
pick up item

conditions:
item class is permanent

actions
if item level > unit custom value
then
       drop item
else
       //other triggers go here.

it would work like if you put a wand to level 2 and then set the knight's custom value to 1, he would not wear it. hope it helped.

This is a really good idea, but isn't there a cap of 8 item levels?
Is there any way to make it so there is more item levels?

I mean, there is way two many types of items to be summed up into only 8 levels.
02-28-2005, 02:33 PM#9
oNdizZ
This will work if you dont uses the custom values of your units already, and if you make the items invulnerable:

Code:
Auto Drop
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Hero manipulating item)) Not equal to (Integer((Current life of (Item being manipulated))))
            Then - Actions
                Hero - Drop (Item being manipulated) from (Hero manipulating item)
            Else - Actions
02-28-2005, 02:45 PM#10
Zero
Quote:
Originally Posted by oNdizZ
This will work if you dont uses the custom values of your units already, and if you make the items invulnerable:

Code:
Auto Drop
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Hero manipulating item)) Not equal to (Integer((Current life of (Item being manipulated))))
            Then - Actions
                Hero - Drop (Item being manipulated) from (Hero manipulating item)
            Else - Actions

I will give this a shot. Thanx alot.

BTW - NARUTO KICK SOME SERIOUS ARSE. One of my favorite series :D
02-28-2005, 03:04 PM#11
Zero
Is the point value of a unit it's custom vaule?
02-28-2005, 04:28 PM#12
Zero
I just thought of something:

Auto Drop
Events
Unit - A unit acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Hero manipulating item)) Not equal to (Integer((Current life of (Item being manipulated))))
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions

Hero Custom Code Setup:

Warrior = 1
Cleric = 2
Thief = 3
Sorcerer = 4
Druid = 5
Ranger = 6
Assassin = 7
Berserker = 8
Necromancer = 9
Sniper = 10
Summoner = 11
Shadow Hunter = 12
Dark Knight = 13
Samurai = 14
Ninja = 15
Monk = 16
Sea Witch = 17
Elemental = 18

Items:

Swords can be used by warrior, assassin, dark knight, ninja, samurai.
Hammers can be used by cleric, ninja, dark knight.
Axes can be used by warrior, berserker, ninja
Shields can be used by warrior, cleric, dark knight.
Staffs can be used by sorcerer, druid, necromancer, shadow hunter, summoner, elemental, sea witch.
Bows can be used by ranger, shadow hunter, sea witch.

The Controversy:

What would you need to set the items 2 for this to work right?

Sword =
Hammer =
Axe =
Shield =
Staff =
Bow =
02-28-2005, 04:53 PM#13
divine_peon
uhh... huh...

because the warrior can wear almost all items and the ranger can only wear one, i'll make them examples...

set the value of
warrior to 4.
ranger to 6.

then the item classification
sword = 1 hammer = 2 axe = 3 shield = 4 staff = 5 bow = 6

Code:
Event:
a unit acquires an item

conditions:
item class is permanent

actions
if unit type of triggering unit equal to ranger
then
       if item level not equal to custom value
             then
                     drop item
             else
                     //other actions
else
       if item level greater than unit custom value
              then
                   drop item
              else
                   //other actions
you have to do this for the others too.
02-28-2005, 05:53 PM#14
Zero
Quote:
Originally Posted by divine_peon
uhh... huh...

because the warrior can wear almost all items and the ranger can only wear one, i'll make them examples...

set the value of
warrior to 4.
ranger to 6.

then the item classification
sword = 1 hammer = 2 axe = 3 shield = 4 staff = 5 bow = 6

Code:
Event:
a unit acquires an item

conditions:
item class is permanent

actions
if unit type of triggering unit equal to ranger
then
       if item level not equal to custom value
             then
                     drop item
             else
                     //other actions
else
       if item level greater than unit custom value
              then
                   drop item
              else
                   //other actions
you have to do this for the others too.

I am still seeing issues between items. Here is the full details of the items and heros.

Hero Custom Code Setup:

Warrior =
Cleric =
Thief =
Sorcerer =
Druid =
Ranger =
Assassin =
Berserker =
Necromancer =
Sniper =
Summoner =
Shadow Hunter =
Dark Knight =
Samurai =
Ninja =
Monk =
Sea Witch =
Elemental =

Items:

Swords can be used by warrior, assassin, dark knight, ninja, samurai.
Hammers can be used by cleric, ninja, dark knight.
Axes can be used by warrior, berserker, ninja
Daggers can be used by thief, sorcerer, druid, necromancer, summoner, ninja.
Staffs can be used by sorcerer, druid, necromancer, shadow hunter, summoner, elemental, sea witch.
Bows can be used by ranger, shadow hunter, sea witch.
Guns can be used by sniper.

Armor can be used by warrior, cleric, thief, ranger, assassin, berserker, sniper, shadow hunter, dark knight, samurai, ninja.
Robes can be used by sorcerer, druid, necromancer, summoner, sea witch, elemental, monk.

Shields can be used by warrior, cleric, dark knight.

The Controversy

What would you need to set the items 2 for this to work right?

Sword =
Hammer =
Axe =
Dagger =
Staff =
Bow =
Gun =

Armor =
Robes =

Shields =

I am having a hard time seeing a way to get this to work right... :\
02-28-2005, 06:08 PM#15
divine_peon
whoa! wait, take it easy. heh. :D
just try experimenting with the triggers i've said.

and remember to separate the armor and weapon triggers.
for the shields, include it in the weapon trigg so that you can differentiate two-handed weaps against one-handed ones.

that's all for now, i still haven't tested what triggers that i would make for your system. so i can't pull triggers out of nowhere. :D