in need of 2 systems

Happy

Well-Known Member
Reaction score
71
hey all...

i need to make 2 systems for my map and so i ask here for help :D

1. system

System for item combining

i need to make a system that if a certain spell is used checks the name of the item in slot 1 (for example : hammer of the vapmpires) whether it contains hammer, dagger, sword, spear, and so on...if so it should check whether in slot 2 and 3 are 2 certain items (thats easy :D)...now the first tricky part...1 of these 2 items in slot 2 or 3 is an enchantment and i want the system to check the string of it (for example : enchantment of pure strength) whats written after enchantment and then the system should check out of a list of items which item has the name combined of these 2 strings....means in this case with the examples it should find hammer of pure strength...now the second tricky part...my items are ranked and the rank is written behind the whole name means there are hammer of pure strength (Rank 1) , hammer of pure strength (Rank 2) and hammer of pure strength (Rank 3) and the system should check whick rank the item in slot 1 was (for example : Rank 1) and should search the rank +1....so it would be hammer of pure strength (Rank 2)...after finding it the system should remove the items in slots 1,2 & 3 and add the item found...so here it would be hammer of pure strength (Rank 2).

now my problem...i really dont know how to make this system because i never worked with strings...and especially not in a system like this...could you help me there?

2. system

Spell trigger system

this system should do this: a hero has 3 different dummy spells doing nothing. The player has to order the hero to cast these 3 spells in certain orders. If the order was right a spell should be cast...if not a text message sould appear saying that it was wrong.

My problem here is that i dont know how to make this system too....help please ;)


thanks in advance & +rep for sure

greetz happy
 

werasd

New Member
Reaction score
14
Ok. For the first one, i think you will have to make a condition for each different enchantment.

For the second system, you can create a string variable to check. Each spell has a different string value. The first one is '1', the second is '2' and the third is '3'. If this is the correct order, the final string should be '123'. You will also need two other variables. A real variable to count how many times a spell has been cast and a unit variable to set the casting unit to use it in another trigger. I'll give you the example. There are two triggers:
Trigger:
  • Dummy Spell Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set DummyCaster = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Animate Dead
        • Then - Actions
          • Set SpellCheck = (SpellCheck + 1)
          • Set DummySpellCount = (DummySpellCount + 1.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to Avatar
            • Then - Actions
              • Set SpellCheck = (SpellCheck + 2)
              • Set DummySpellCount = (DummySpellCount + 1.00)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to Bladestorm
                • Then - Actions
                  • Set SpellCheck = (SpellCheck + 3)
                  • Set DummySpellCount = (DummySpellCount + 1.00)
                • Else - Actions
                  • Do nothing


Trigger:
  • Dummy Spell Checking
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • DummySpellCount Greater than or equal to 3.00
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SpellCheck Equal to 123
        • Then - Actions
          • Set DummySpellCount = 0.00
          • -------- THE SPELL --------
        • Else - Actions
          • Game - Display to (All players controlled by a ((Owner of DummyCaster) controller) player) the text: The order is wrong.
 

Happy

Well-Known Member
Reaction score
71
so in your case SpellCheck is a string variable? okay thats seems clear :D

for the other system....i dont think i have to make a condition for each enchantment....it has to be doable by using strings...but im not that familiar with strings so if anyone is....please help me
 

HydraRancher

Truth begins in lies
Reaction score
197
Trigger:
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set WeaponStrings[1] = Hammer
      • Set WeaponStrings[2] = Dagger
      • Set WeaponStrings[3] = Sword
      • Set WeaponStrings[4] = Spear
      • Set WeaponStrings[5] = And so on...


Trigger:
  • Bleh
    • Events
    • Conditions
    • Actions
      • -------- Check Slot One --------
      • Set TempString = (Name of (Item carried by (Triggering unit) in slot 1))
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring(TempString, 1, (Length of WeaponStrings[(Integer A)]))) Equal to (Substring(WeaponStrings[(Integer A)], 1, (Length of WeaponStrings[(Integer A)])))
            • Then - Actions
              • -------- That checks whether the item name contains that substring --------
            • Else - Actions


Here is a snippet on checking whether the item is a Hammer, Sword, Spear whatever.

You need to adapt this further, to check what type of hammer it is, ((String Length of (WeaponStrings[(Integer A)]) + 1), (String Length of (TempString)) - 8))

So that basically starts from the word Hammer, +1, then finishes at the end of the hammer, - (Rank #). Note that this will fail if Rank is larger than 9. :)

This is perhaps quite inefficient because of how easy it is to break with a simple typo or if you make some adjustments like larger Ranks.

But it can get it done if you do enough Substring sifting.
 

Happy

Well-Known Member
Reaction score
71
thanks for that Hydra :D

hope im able to do it now ^^ if not ill relife this thread xD
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top