Unit range help

Axe.killer

New Member
Reaction score
24
I need help with an item. When a hero picks up the item, his range increases by 300. Then when he drops it, it decreases by 300. However, when you use the upgrade long rifles, when u drop it once and pick it up, it dosent work any more. The unit has its original range, with the item in his inventory. It works if the hero dosent drop it.
 

Tom Jones

N/A
Reaction score
437
It still works. Once you upgraded it will stay upgraded, regardless of your hero having the item or not. But i believe nightelf got a skill that does that excat thing. It's called longbows as far as i remember.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Detect when the unit drops the item and set the upgrade level to 0 via triggers.
 

Axe.killer

New Member
Reaction score
24
RangeLongBow
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Long Bow
Actions
Player - Set the current research level of Long Rifles to 1 for Player 1 (Red)


RangeLongBow Copy
Events
Unit - A unit Loses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Long Bow
Actions
Player - Set the current research level of Long Rifles to 0 for Player 1 (Red)

dosent work
 

Sim

Forum Administrator
Staff member
Reaction score
534
Did you apply the upgrade to your unit?
 

Axe.killer

New Member
Reaction score
24
got it. For future references, its far more complex.
mapinit
Events
Map initialization
Conditions
Actions
Set Range = 0
Set Range_2 = 0

RangeLongBow
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Long Bow
Actions
Set Range = (Range + 1)
Player - Set the current research level of Long Rifles to Range for Player 1 (Red)

RangeLongBow Degrade
Events
Unit - A unit Loses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Long Bow
Actions
Set Range_2 = (Range_2 + 1)
Player - Set the current research level of Degrade to Range_2 for Player 1 (Red)

There are 2 upgrades, based of the long rifles ability. one with +300 incriments, and one with -300 incriments. There are 1000 levels to the upgrades, so someone wont be able to bug.
 

Chocobo

White-Flower
Reaction score
409
got it. For future references, its far more complex.
mapinit
Events
Map initialization
Conditions
Actions
Set Range = 0
Set Range_2 = 0

RangeLongBow
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Long Bow
Actions
Set Range = (Range + 1)
Player - Set the current research level of Long Rifles to Range for Player 1 (Red)

RangeLongBow Degrade
Events
Unit - A unit Loses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Long Bow
Actions
Set Range_2 = (Range_2 + 1)
Player - Set the current research level of Degrade to Range_2 for Player 1 (Red)

There are 2 upgrades, based of the long rifles ability. one with +300 incriments, and one with -300 incriments. There are 1000 levels to the upgrades, so someone wont be able to bug.

But it'll be damn laggy for load. Simply use 0 levels, it should work.
 

Axe.killer

New Member
Reaction score
24
It wont be that laggy. 1000 upgrades with no tooltips i dont think would be laggy at all as apposed to unit lag. The 0 upgrade dosent work because you cant degrade a unit.
 
M

Metalelf

Guest
Well instead of upgrading why dont you do somthing easy like
rangees4.png

Not sure if it will work because i dont spend much time with things such as changing range but its worth a try. Also to decrease the effect just replace the things with the oppisite of what they are. Such as aquires item would be loses/dropped the item. And the + would be a - .


Also make sure you put conditon as the item that they picked up. This way it will be differnt for each bow (long/short/greater/lesser ect.)
 

Chocobo

White-Flower
Reaction score
409
Well instead of upgrading why dont you do somthing easy like
rangees4.png

Not sure if it will work because i dont spend much time with things such as changing range but its worth a try. Also to decrease the effect just replace the things with the oppisite of what they are. Such as aquires item would be loses/dropped the item. And the + would be a - .


Also make sure you put conditon as the item that they picked up. This way it will be differnt for each bow (long/short/greater/lesser ect.)

Next time test it. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top