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
 
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.
 
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
 
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.
 
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.
  • Varine Varine:
    I'm now realizing I could have cut out like 99% of this print and it would have been fine cuz I just need to see if a frame will fit over an LCD
  • Varine Varine:
    Oh well
  • Varine Varine:
    I'm not an engineer
  • Varine Varine:
    Although this filament is kind of expensive, I should probably be a bit more wary of that.
  • The Helper The Helper:
    I love the whole concept of 3D Printers and am very happy you have one so I can hear about them
  • The Helper The Helper:
  • Varine Varine:
    I have a couple of them, but I only have room for one to be set up at the moment
  • Varine Varine:
    So I picked the biggest one. When I bought it, I didn't realize that they used a lot of proprietary parts. So, I want to use these Volcano nozzles that are really cheap and easy to find instead of what they have, which are like, modified Volcano nozzles
  • Varine Varine:
    They are just a little bit longer than the regular ones. Like, we're talking .5mm or some shit. But that little bit makes the nozzle just long enough to extrude past the rest of the hardware on the extrusion system, I can't find my notes on it but I think it's like a .25mm gap from the end of the nozzle to the bed mesh sensor. Very small.
  • Varine Varine:
    So I bought a bunch of different parts to try and figure out how to make this work, and in the process changed some of the electrical components like the thermistors, but never got around to figuring out how to make the firmware account for the different hardware. Resulting in it not interpreting the voltage change to mean that the thermistor was above temperature, so it didn't shut off the heating core and it just kept pumping heat out
  • Varine Varine:
    I have most of the stuff I need to build an enclosure so I can heat the chamber for different plastics that need to have a pretty consistent temperature through the whole model, and then I can get my other ones set up too. I have a shitty Ender but that one is super easy to modify, but it's also very outdated and kind of a nightmare to work with. I think I'm going to cannibalize it for parts and just run my big one and another little one.
  • Varine Varine:
    I think I solved my problem with digitizing reels tho!
  • Varine Varine:
    Like Super 8 reels. Actual equipment to do it is like, thousands and thousands of dollars, and the cheap ones are useless, so I'm trying to build one so I can just use the same camera I use for slides and negatives. Much cheaper
  • Varine Varine:
    Anyway, it kind of works, but the take up reel is kind of tricky because you need to spin it directly to wind the tape onto it. And as it fills, you need to slow it down, and that's kind of complicated. More complicated than I wanted to try and account for, anyway.
  • Varine Varine:
    So I have the first motor that has gearing pull it from the original reel, through a set of pullies to keep some tension, and then a second motor synced with the first to guide it through the projection port so I can capture the images
  • Varine Varine:
    All that's easy enough, I just need to make sure I don't get too much force onto the film itself so I don't accidentally tear it.
  • Varine Varine:
    Then I think my solution to the take up reel is to have a kind of dancing lever on a spring in between two limit switches
  • Varine Varine:
    So, as the tape comes towards the take up reel and makes slack, that lever is pulled up by a spring to keep the tension on the film, it hits a limit switch to engage the take up reel motor at some point, and as that winds in the film, the film pushes the lever back down to a second limit switch to disengage the motor again. Slack builds up, spring pulls it back, ad infinitum
  • Varine Varine:
    Well, until the reel is empty anyway.
  • Varine Varine:
    I'm guessing it's going to be much harder than I feel like it is going to be right now, but I think it's a pretty elegant solution that doesn't rely on software to control it. The less software I need to use the better
  • Varine Varine:
    I'm just not a very good programmer, as much as I want to be I suck at it
  • The Helper The Helper:
    Programming that printer is going to be similar to programming a big machine like in a machine shop. There is good money in programming CNC machines.
  • The Helper The Helper:
    +1
  • Varine Varine:
    They are pretty similar, but this one is much less involved than a real CNC. A lot less moving parts
    +1
  • The Helper The Helper:
    Happy Monday!

      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