Problems with point variable

Baltazhar

Active Member
Reaction score
55
I've made a spell based on Death and Decay, so it's an AoE template spell.

I'm not sure if this is even logical/possible, but when I make a
Code:
Set Temp_Point = (Target point of ability being cast)
Would it just, do nothing (since the target is an area and not a point), or should it (cuz it surely doesn't) set the point to center of area?

If this can't even work, cuz of the Area to Point thing, are there any other ways to determine the center of the area of cast ability?

Thx in advance
- Balt
 

Baltazhar

Active Member
Reaction score
55
Okay, that just strikes me odd...

I made a test where I set the point as shown in the code above, and had the camera pan to the point set, and it was somewhere else. In the ability I am making, it's kinda crusial :)

I've checked the trigger to see where it went wrong, and the point didn't get set as it should. I'll recheck and write again..
 

Baltazhar

Active Member
Reaction score
55
Okay, apparently it worked alrdy :nuts: - But +rep anyway Ace :)

I have a new problem with some sliding. I have checked a Sliding Tutorial on this site, without any luck on my current question.

Effect: All units within 300 of Temp_Point gets moved closer to Temp_Point.

I have turned off collision size the for units in question, but that only prevents them from hitting any obstacles, and they are themselves still considered as obstacles? - With this they should ignore eachother and just move closer eventho they're on top of 20 other units?

Posting the code in case anyone wants to inspect the 3 page damn thing :)
Code:
Frozen Core
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Frozen Core 
    Actions
        Set FrozenCoreLumber[(Player number of (Owner of (Casting unit)))] = ((Owner of (Casting unit)) Current lumber)
        Player - Set (Owner of (Casting unit)) Current lumber to 0
        Set FrozenCoreSize1[(Player number of (Owner of (Casting unit)))] = 150.00
        Set FrozenCoreSize2[(Player number of (Owner of (Casting unit)))] = 150.00
        Set FrozenCoreSize3[(Player number of (Owner of (Casting unit)))] = 150.00
        Floating Text - Create floating text that reads (Frozen Core deals  + ((String((FrozenCoreLumber[(Player number of (Owner of (Casting unit)))] x 30))) +  damage!)) above (Casting unit) with Z offset 0.00, using font size 10.00, color (10.00%, 100.00%, 10.00%), and 0.00% transparency
        Floating Text - Show (Last created floating text) for (All players)
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
        Set Temp_Point = (Target point of ability being cast)
        Unit - Create 1 Frozen Core for (Owner of (Casting unit)) at Temp_Point facing Default building facing degrees
        Set Temp_Group = (Units within 300.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))
        Game - Display to (All players) the text: (Temp_Group:  + (String((Number of units in Temp_Group))))
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit Group - Pick every unit in Temp_Group and do (Actions)
            Loop - Actions
                Unit - Turn collision for (Picked unit) Off
                Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
                Unit - Set (Picked unit) movement speed to 0.00
        Custom script:   call DestroyGroup (udg_Temp_Group)
        For each (Integer A) from 1 to 60, do (Actions)
            Loop - Actions
                Set FrozenCoreSize1[(Player number of (Owner of (Casting unit)))] = (FrozenCoreSize1[(Player number of (Owner of (Casting unit)))] - 2.00)
                Set FrozenCoreSize2[(Player number of (Owner of (Casting unit)))] = (FrozenCoreSize2[(Player number of (Owner of (Casting unit)))] - 2.00)
                Set FrozenCoreSize3[(Player number of (Owner of (Casting unit)))] = (FrozenCoreSize3[(Player number of (Owner of (Casting unit)))] - 2.00)
                Set Temp_Group = (Units owned by (Owner of (Casting unit)) of type Frozen Core)
                Animation - Change (Random unit from Temp_Group)'s size to (FrozenCoreSize1[(Player number of (Owner of (Casting unit)))]%, FrozenCoreSize2[(Player number of (Owner of (Casting unit)))]%, FrozenCoreSize3[(Player number of (Owner of (Casting unit)))]%) of its original size
                Custom script:   call DestroyGroup (udg_Temp_Group)
                Set Temp_Group = (Units within 300.00 of Temp_Point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Casting unit))) Equal to True))
                Set Temp_Point = (Target point of ability being cast)
                Unit - Move (Picked unit) instantly to ((Center of (Playable map area)) offset by ((Distance between (Position of (Picked unit)) and Temp_Point) - 5.00) towards (Angle from (Position of (Picked unit)) to Temp_Point) degrees), facing Temp_Point
                Custom script:   call RemoveLocation (udg_Temp_Point)
                Custom script:   call DestroyGroup (udg_Temp_Group)
                Wait 0.05 seconds
        Set Temp_Group = (Units within 300.00 of Temp_Point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Casting unit))) Equal to True))
        Unit Group - Pick every unit in Temp_Group and do (Actions)
            Loop - Actions
                Unit - Cause (Casting unit) to damage (Picked unit), dealing ((Real(((Owner of (Casting unit)) Current lumber))) x 30.00) damage of attack type Spells and damage type Normal
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is dead) Equal to True
                    Then - Actions
                        Set FrozenCoreKill[(Player number of (Owner of (Casting unit)))] = (FrozenCoreKill[(Player number of (Owner of (Casting unit)))] + 1)
                    Else - Actions
                        Unit - Turn collision for (Picked unit) On
                        Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
                        Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
        Custom script:   call DestroyGroup (udg_Temp_Group)
        Set Temp_Group = (Units owned by (Owner of (Casting unit)) of type Frozen Core)
        Unit Group - Pick every unit in Temp_Group and do (Actions)
            Loop - Actions
                Unit - Remove (Picked unit) from the game
        Custom script:   call DestroyGroup (udg_Temp_Group)
        Set Temp_Point = (Position of (Casting unit))
        Set Temp_Group = (Units within 500.00 of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))
        For each (Integer A) from 1 to (FrozenCoreKill[(Player number of (Owner of (Casting unit)))] / 3), do (Actions)
            Loop - Actions
                Unit - Create 1 Frozen Core Aftershock for (Owner of (Casting unit)) at Temp_Point facing Default building facing degrees
                Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                Unit - Order (Last created unit) to Undead Lich - Frost Nova (Random unit from Temp_Group)
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Custom script:   call DestroyGroup (udg_Temp_Group)

Hope someone can give a minor pointer...
 

vypur85

Hibernate
Reaction score
803
Code:
        For each (Integer A) from 1 to 60, do (Actions)
            Loop - Actions
                Set FrozenCoreSize1[(Player number of (Owner of (Casting unit)))] = (FrozenCoreSize1[(Player number of (Owner of (Casting unit)))] - 2.00)
                Set FrozenCoreSize2[(Player number of (Owner of (Casting unit)))] = (FrozenCoreSize2[(Player number of (Owner of (Casting unit)))] - 2.00)
                Set FrozenCoreSize3[(Player number of (Owner of (Casting unit)))] = (FrozenCoreSize3[(Player number of (Owner of (Casting unit)))] - 2.00)
                Set Temp_Group = (Units owned by (Owner of (Casting unit)) of type Frozen Core)
                Animation - Change (Random unit from Temp_Group)'s size to (FrozenCoreSize1[(Player number of (Owner of (Casting unit)))]%, FrozenCoreSize2[(Player number of (Owner of (Casting unit)))]%, FrozenCoreSize3[(Player number of (Owner of (Casting unit)))]%) of its original size
                Custom script:   call DestroyGroup (udg_Temp_Group)
                Set Temp_Group = (Units within 300.00 of Temp_Point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Casting unit))) Equal to True))
                Set Temp_Point = (Target point of ability being cast)
                Unit - Move (Picked unit) instantly to ((Center of (Playable map area)) offset by ((Distance between (Position of (Picked unit)) and Temp_Point) - 5.00) towards (Angle from (Position of (Picked unit)) to Temp_Point) degrees), facing Temp_Point
                Custom script:   call RemoveLocation (udg_Temp_Point)
                Custom script:   call DestroyGroup (udg_Temp_Group)
                Wait 0.05 seconds

Sliding is best done via periodic trigger. Using waits may not provide the best result I think. Anyway, is you problem only the collision? Did the units get pulled? The above trigger has some mistakes. You did not pick any units (there is no Unit Group actions). And it's best to use custom Integer variable instead of the standard Integer A. And you have to use variables for your casting units because of the waits.

Maybe you should explain more on what the ability is supposed to do and what it does not do?
 

Baltazhar

Active Member
Reaction score
55
lol ffs! vypur u're a genius! I forgot the "Pick all units in Group" xD

The idea of the spell is: U set the template over the desired area, and a giant iceblock covers it. All units within freezes solid, and the iceblock shrinks. While it shrinks, the units inside gets pulled more and more towards the center of the casting point (so they still appear to be inside the iceblock). And when the iceblock is a given size, it explodes and give damage.
This is the main effect I wanted to create. An additional effect is, that for each 3 units dying in the iceblock, it creates an aftershock (frostnova) on X nearby enemy units.

<3 and +rep :)
 

Baltazhar

Active Member
Reaction score
55
Hmm.. Didn't even see that spell. Well there is quite a few things they have in common. I did think of Enigma's Dark Hole (DotA), just wanted to spice it up a bit with some frost effects, and make some aftershock explosions depending on units killed.
Other than that, same idea :)

Thx for linking the spell, I can compare the triggers between them, and see if I could have done something smarter here and there :eek:
 
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

      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