Variable Questions.

WackO_WilL

New Member
Reaction score
4
I read this sites Variables Basic page, But i read it, and afterwords, Still asked myself what did i just learn? nothing much. Im kinda dense.

okay, I do NOT, know at ALL, How to do variables, So I'm going to ask for an example to study from, all I need is two and ill be able to do the rest on my own, For a variable/trigger that would put A special effect on the left hand of a unit when it is put into slot 1. And when you took the item out of slot 1, It would make the Effect dissapear from your hand. or if you placed it in your 2ed slot, It would show up in your right hand. Thanks to all who Help me in advance.
 

WackO_WilL

New Member
Reaction score
4
yeah, And after reading both, I still dont know how to get what i want o.o Is it that obvious?! Ive read the variables one like 3 times still dont understand it.
 

Hatebreeder

So many apples
Reaction score
381
Well
Sotre your values to the matching Variable, so that you can use them after waits etc.
 

WackO_WilL

New Member
Reaction score
4
I have no idea what triggers to use o.o this is what i got sofar, but i just got a crapload of errors
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Stone Sword Equal to (Item-type of (Item carried by Marooned Survivor 0001 <gen> in slot 1))
Then - Actions
Special Effect - Create a special effect attached to the Left hand of Marooned Survivor 0001 <gen> using ShortSword.mdx
Set Weapons[1] = (Last created special effect)
Else - Actions
Special Effect - Destroy Weapons[1]
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I have no idea what triggers to use o.o this is what i got sofar, but i just got a crapload of errors
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Stone Sword Equal to (Item-type of (Item carried by Marooned Survivor 0001 <gen> in slot 1))
Then - Actions
Special Effect - Create a special effect attached to the Left hand of Marooned Survivor 0001 <gen> using ShortSword.mdx
Set Weapons[1] = (Last created special effect)
Else - Actions
Special Effect - Destroy Weapons[1]

I can't seem to figure out what this is supposed to do. Weapons[1] is the created special effect, and you create that effect if your unit carries the item in slot 1. From how it looks now you remove that special effect (which isn't created) if the unit does not carry the weapon in slot 1.

Is it important that the attachment only shows if you carry the item in slot 1? Otherwise you can just add it to the item in the Object Editor.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Maybe he wants that if the item is in a certain slot, the SFX will also show up in a certain slot.

You run the trigger every 2 seconds, creating a SFX everytime.
That'll lag after the first 10-15 minutes.

EDIT:
Or even faster.
 

WackO_WilL

New Member
Reaction score
4
Well, yeah it is kinda important, Because in my map, I want to make it where you only get item benefits and SFX when your weapon is in Slot 1, Thats your mainhand, And then smaller weapons, Or a Sheild into Slot 2. Then i wanna make some armor items that can only be worn in 3-6.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I read this sites Variables Basic page, But i read it, and afterwords, Still asked myself what did i just learn? nothing much. Im kinda dense.

okay, I do NOT, know at ALL, How to do variables, So I'm going to ask for an example to study from, all I need is two and ill be able to do the rest on my own, For a variable/trigger that would put A special effect on the left hand of a unit when it is put into slot 1. And when you took the item out of slot 1, It would make the Effect dissapear from your hand. or if you placed it in your 2ed slot, It would show up in your right hand. Thanks to all who Help me in advance.

Didn't read this part. So basically you want it to be one effect on the left hand if in slot 1, one on the right hand if the item is in slot 2, and no effects if the item is in any other slot. How about

Events
A unit aquires an item

Conditions
Item-Type of item being manipulated equal to <your item> and Unit-Type of triggering unit equal to <your unit>

Actions
if (All conditions are True) then do (Then Actions) else do (Else Actions)
if - Conditions
Item-Type of (Item carried by <your unit> in slot 1) equal to <Your item>

Then Actions
Create special effect attached to the left hand of <your unit> using <your model>
Set WeaponEffect = last created special effect
Turn on ItemRemove <gen>

Else Actions
Do nothing

---------------------------------------------------------
Item Remove (Initially off)

Events
Every 0.0X seconds of game time

Conditions
Item-type of (item carried by <your unit> in slot 1) Not Equal To <your item>

Actions
Destroy WeaponEffect
Turn off (This trigger)
-----------------------------------------------------------------

I have no idea if this works though, since I haven't tried it myself. Try it out, and if it doesn't work we'll try something else.

Edit:
If you want main weapons to be slot 1, shields and off hands to be slot 2, armors slot 3 etc, why not make it so that you can only have Weapons in slot 1, shields/off hands in slot 2 and armors in slot 3 then?
 

WackO_WilL

New Member
Reaction score
4
Im trying to make it versatile, Items will have an option to be either Main hand, Or offhand only, Some items are Both.Example.
Lumber Axe.
Main hand only.
+12 attack and +2 lumber return.
Attack speed Slowed.(by some percentage.

Sword
Main hand and Offhand
+6 Damage, Chance to cause bleed effect to enemy target.
Attack speed increase (by some stupid percentage, or other means.

Sheild
Offhand only.
+5 Armor, Increases chance to Block next attack 5%
Speed reduced slightly (Some stupid integer)

Im making a survival Map where you make your own weapons, but cant stack them, And each weapon you make gives you perks, Some weapons might do crazy damage, but slow attackspeed, Or not so crazy damage, but fast attack speed. And the dual weild is prettymuch eyecandy,

Axe
12 damage -20%off of attack swing.
Sword, 3 damage, +5% attack swing,

Turns out to be, 15 damage, -15% attack swing.
Editing model attack animation to make it look like its attacking with both weapons too. Or in combination with a sheild, Kinda Sticking out the sheild for defence.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Why not drop the items from the hero if he for example picks up a Sword in slot 3 or 4, that way it'll be much easier. You can make a backpack unit or something to hold items which you can't carry at that point.
 

WackO_WilL

New Member
Reaction score
4
Eh, A backpack unit, hmm. That will solve ALOT of issues, How would i do it though? Im sure somewhere I can find a system, time for Search engine! *Music* Even though, I kinda like my system, But if its overcomplicated, It will provide same gameplay if i use a backpack system
 

WackO_WilL

New Member
Reaction score
4
I saw that, But I was thinking of something different, How about making my Hero able to carry 1 Unit, And that only unit was a Crate, With 6 slots, And I could put items into it, And then press the load button on my crate, and my hero picks it up, then i rightclick it, And it pops out of the hero, Kinda like an invintory button, Make it invulnerable, and not able to move, and BAM, we gots ourselfs a Backpack, Soz im thinking, Would this work?
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I've seen something similar in a Diablo 2 RPG I played where the Horadric Cube was an item which you dropped to make it a crate on the ground. From there you could insert items in it and then right click it to be able to pick it up again. So it do work, but I guess it'll require some work. If you're decent with triggering I guess you'll make it though, since I don't think it's too advanced.
 

WackO_WilL

New Member
Reaction score
4
Nah, I dont think it is, Maybe all i gotta do is just changed some Abillitys, like the Orc burrow one? Kinda make the Survivor a Burrow, and the Box a Peon, That should work out with out any triggers maybe.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
But you do want the crate to be able to turn back into an item right? And then you also gotta make sure that the items the crate it carrying will still be there when you open it again. This is probably the most annoying part I think.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
You should probably ask waaaks!, he once used a backpack system (similar to what you want) in his map.
But I'm not sure if he's the original creator of the Backpack system.
(in JASS)
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I've never made a system like this myself so I really have no clue what to do, but if you need help just tell me and I can open up WE and try some things out. I guess it can't be that hard to make if you put some efford in it.
 

WackO_WilL

New Member
Reaction score
4
I think ill just make a custom abillity, called, Open Backpack, and it instantly moves your backpack to your guy from a small remote location in the bottom right most corner, Then The abillity dissapears, and turns to a different icon, called, Close Backpack, And you target your backpack and if you 150 units away, your guy will "close It" instantly teleport it from him to the corner, It has 0 Visabillity and cannot move. invulnerable. If you lose it on the map, you can type "Ping my Backpack" and it pings your backpack on the minimap (If it isnt put away) It will then appear as a backpack.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top