Nice Triangle Form

soulmaka

New Member
Reaction score
2
i have a sliding trigger. i have created a special effect on the Position of triggering unit and that special effect is a Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl It can create a nice triangle form.. but how?? is it a Math Trigger?
 

SwedishChef

New Member
Reaction score
32
i guess he means /\ :p you can use create lightning effect between point and use point with offset to set the points
 

Danis[h]

New Member
Reaction score
19
i have a sliding trigger. i have created a special effect on the Position of triggering unit and that special effect is a Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl It can create a nice triangle form.. but how?? is it a Math Trigger?

For creating a triangle, you will need 3 points i believe.

I would use the units position as reference then set the 2nd point somewhere at the unit's x+[some value]
and then setting the 4rd point to unit's y+[some value]

so Unitposition is
A(x1,y1)
then point 2 would be
B(x2+x1,y1)
and point 3 would be
C(x1,y3+y1)

There might be an easier way though.
 

soulmaka

New Member
Reaction score
2
For creating a triangle, you will need 3 points i believe.

I would use the units position as reference then set the 2nd point somewhere at the unit's x+[some value]
and then setting the 4rd point to unit's y+[some value]

so Unitposition is
A(x1,y1)
then point 2 would be
B(x2+x1,y1)
and point 3 would be
C(x1,y3+y1)

There might be an easier way though.

LOL .. 4rd?? hahaha.. btw what is this value?? Math??
 

soulmaka

New Member
Reaction score
2
I acidentally hit 4 instead of 3. That's meant to be 3rd.. Obviously you dont have points 1, 2 and then 4. Just skipping 3.

This??

Code:
Set LF_CP = ((Center of (Playable map area)) offset by (1.00, 1.00))
 

Danis[h]

New Member
Reaction score
19
Actions
Set Point[1] = (Position of (Triggering unit))
Set Point[2] = (Point[1] offset by (100.00, 0.00))
Set Point[3] = (Point[1] offset by (0.00, 100.00))

Would make out a small triangle.
 

soulmaka

New Member
Reaction score
2
Actions
Set Point[1] = (Position of (Triggering unit))
Set Point[2] = (Point[1] offset by (100.00, 0.00))
Set Point[3] = (Point[1] offset by (0.00, 100.00))

Would make out a small triangle.

only 2 points?? how aboutthe third one?? i can't be the Position of triggering unit.. because it's his position.. he will still move on it's current position.. means.. nothing happens
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
use angles, not coordinates...

take some center point, like position of unit

like this:

Trigger:
  • actions
    • set StartPoint = position of <unit>
    • set Angle = -30.00
    • for each (Integer A) from 1 to 3 do actions
      • loop
        • set Point1 = StartPoint offset by 500 towards angle degrees
        • set Point2 = StartPoint offset by 500 towards angle + 120.00 degrees
        • lighting effect - create a lighting effect starting from Point1 to Point2
        • call RemoveLocation(udg_Point1)
        • call RemoveLocation(udg_Point2)
        • set angle = angle + 120.00


this will form a nice triangle around the unit

don't forget to destroy the effects
 

soulmaka

New Member
Reaction score
2
use angles, not coordinates...

take some center point, like position of unit

like this:

Trigger:
  • actions
    • set StartPoint = position of <unit>
    • set Angle = -30.00
    • for each (Integer A) from 1 to 3 do actions
      • loop
        • set Point1 = StartPoint offset by 500 towards angle degrees
        • set Point2 = StartPoint offset by 500 towards angle + 120.00 degrees
        • lighting effect - create a lighting effect starting from Point1 to Point2
        • call RemoveLocation(udg_Point1)
        • call RemoveLocation(udg_Point2)
        • set angle = angle + 120.00


this will form a nice triangle around the unit

don't forget to destroy the effects

Hmmm.. I'll Try this one.. can you make it In Jass?? I'm Learning Jass Now.. ^^
 

Tyrulan

Ultra Cool Member
Reaction score
37
Making it in Jass wouldn't be that hard but if you wanted to lets say make it MUI while removing all leaks well then you've asked someone to do a fair amount of work. Get as far as you can on your own making this spell (or triangle) and ask for help when you need it and I'd be glad to!
 

soulmaka

New Member
Reaction score
2
Making it in Jass wouldn't be that hard but if you wanted to lets say make it MUI while removing all leaks well then you've asked someone to do a fair amount of work. Get as far as you can on your own making this spell (or triangle) and ask for help when you need it and I'd be glad to!

Sure!! btw.. it worked!! thanks Dinowc!! +rep
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
can you make it In Jass??

JASS:
scope triangle initializer init

// You can change this:
globals
    private constant integer ID = 'AHbz' 
    private constant string light = "DRAM" //I used mana drain effect
    private constant real radius = 500.00 //the size of the triangle
    private constant real EffectZ = 50.00 //the height of the triangle
    private constant integer n = 3 //number of angles
    private constant real angleInc = 360.00 / I2R(n)
    private constant real duration = 5.00
endglobals

//Don't touch this:

private function conditions takes nothing returns boolean
    return GetSpellAbilityId() == ID
endfunction

private function PolarX takes real x, real dist, real angle returns real
    return x + dist * Cos(angle * bj_DEGTORAD)
endfunction

private function PolarY takes real y, real dist, real angle returns real
    return y + dist * Sin(angle * bj_DEGTORAD)
endfunction

private function actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local location target = GetSpellTargetLoc()
    local lightning array Effect
    
    local real angle = GetUnitFacing(caster) - angleInc
    local real x = GetLocationX(target)
    local real y = GetLocationY(target)
    
    local integer i = 0
    
    loop
        set Effect<i> = AddLightningEx(light, false, PolarX(x,radius,angle), PolarY(y,radius,angle), EffectZ, PolarX(x,radius,angle + angleInc), PolarY(y,radius,angle + angleInc), EffectZ)
        set angle = angle + angleInc
        set i = i + 1
        exitwhen i &gt;= n
    endloop
    
    call TriggerSleepAction(duration)
    
    set i = 0
    loop
        call DestroyLightning(Effect<i>)
        set i = i + 1
        exitwhen i &gt;= n
    endloop
    
    call RemoveLocation(target)
    set caster = null
    set target = null
endfunction
//===========================================================================
private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    loop
        call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set i = i + 1
        exitwhen i == bj_MAX_PLAYER_SLOTS
    endloop
    
    call TriggerAddCondition(t, Condition(function conditions))
    call TriggerAddAction(t, function actions)
    
endfunction

endscope
</i></i>


I was bored :p

it's MUI ofc
 
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