• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Some maths .

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
I've received a spell request . It's an Andrenaline Dash . I stopped it for 2 weeks because of some projects .Now I came back to it . I don't face any problem with it but MATHS oO . I can think this myself , But It will take long . So I would be glade if you help me :D so you save my time crushing my head on maths stupid maths .
2dm8i15.png
[/IMG]


What should you calculate? ::
Ok The hooks will give a force to make the hero dashes towards target . the hooks are linked with the hero by chain elements ( dummies ) . The problem is :
When the hero moves B distance . The Chain elements should move Z distance , so they are ordered and it will look like the chain elements are one piece like lightning effect . Thanks !
I will mark this as solved in two cases :
1- Some one helps me before I solve it .
2- I solve it before some one does ^__^



SOLVED
 
Last edited:
Level 22
Joined
Sep 24, 2005
Messages
4,821
Three Dimensional Maneuver gear?
Polar project lines x1,A and x2. Each step reducing the distance.
 
Level 4
Joined
Aug 22, 2008
Messages
100
If I am understanding this correctly its kinda like a slingshot am I right?
If thats the case cant you just use the angle between the 2 points (Hero and chain latch) to get a line. You can then divide the distance by the amount of chain elements.

Do you understand? Have I misunderstood?
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Well I already use Tallis' law ._. I returned 0 . Everything is crappy , Look what I've done :|
This creates two hooks with different angles . But , The chain elements are the problem :
  • Hook Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer AD_LoopInteger) from 1 to 2, do (Actions)
        • Loop - Actions
          • Set AD_Hook1_Point[AD_LoopInteger] = (Position of AD_Hook_Dummy[AD_LoopInteger])
          • Set AD_Angleno[1] = ((Facing of AD_Caster[AD_MUI_Integer]) - 45.00)
          • Set AD_Angleno[2] = ((Facing of AD_Caster[AD_MUI_Integer]) + 45.00)
          • Set AD_Hook1_NextP[AD_LoopInteger] = (AD_Hook1_Point[AD_LoopInteger] offset by 50.00 towards AD_Angleno[AD_LoopInteger] degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain cliff level at AD_Hook1_NextP[AD_LoopInteger]) Equal to (Terrain cliff level at AD_Hook1_Point[AD_LoopInteger])
            • Then - Actions
              • Unit - Move AD_Hook_Dummy[AD_LoopInteger] instantly to AD_Hook1_NextP[AD_LoopInteger]
              • Unit - Create 1 Chain for (Owner of AD_Caster[AD_MUI_Integer]) at AD_Hook1_Point[AD_LoopInteger] facing AD_Angleno[AD_LoopInteger] degrees
              • Set Unit_Chain[IntegerInteger_Chain[AD_LoopInteger]] = (Last created unit)
              • Set IntegerInteger_Chain[AD_LoopInteger] = (IntegerInteger_Chain[AD_LoopInteger] + 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain cliff level at AD_Hook1_NextP[AD_LoopInteger]) Greater than (Terrain cliff level at AD_Hook1_Point[AD_LoopInteger])
                • Then - Actions
                  • Set AD_Hook_Stop[AD_LoopInteger] = True
                • Else - Actions
          • Custom script: call RemoveLocation(udg_AD_Hook1_Point[udg_AD_LoopInteger])
          • Custom script: call RemoveLocation(udg_AD_Hook1_NextP[udg_AD_LoopInteger])
And This , Should make the chain elements move like a lightning effect between points using Tallis' law . What's wrong? They ain't moving at all :
  • Jump Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set AD_Caster_P[AD_MUI_Integer] = (Position of AD_Caster[AD_MUI_Integer])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AD_NoobInteger Less than or equal to 100
        • Then - Actions
          • Set AD_NoobInteger = (AD_NoobInteger + 1)
        • Else - Actions
      • Set AD_Jump_Next_Point = (AD_Caster_P[AD_MUI_Integer] offset by (Real(AD_NoobInteger)) towards (Facing of AD_Caster[AD_MUI_Integer]) degrees)
      • Unit - Set the custom value of AD_Caster[AD_MUI_Integer] to ((Custom value of AD_Caster[AD_MUI_Integer]) + 3)
      • Set AD_Jump_Height = ((Power(60.00, 2.00)) - (Power(((Real((Custom value of AD_Caster[AD_MUI_Integer]))) - 60.00), 2.00)))
      • Animation - Change AD_Caster[AD_MUI_Integer] flying height to (AD_Jump_Height / (7200.00 / (Load (Key hegh) of (Key AD_CASTER_Handle) from AD_Jump_Hashtable))) at 500.00
      • Set AD_Hooks_UG[AD_MUI_Integer] = (Units of type Chain)
      • Set AD_Hooks_UG_2[AD_MUI_Integer] = (Units owned by (Owner of AD_Caster[AD_MUI_Integer]) matching (((Facing of (Matching unit)) Equal to ((Facing of AD_Caster[AD_MUI_Integer]) + 45.00)) and ((Unit-type of (Matching unit)) Equal to Chain)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current flying height of AD_Caster[AD_MUI_Integer]) Greater than 1.00
        • Then - Actions
          • Unit - Move AD_Caster[AD_MUI_Integer] instantly to AD_Jump_Next_Point
        • Else - Actions
      • For each (Integer AD_LoopInteger) from 1 to 2, do (Actions)
        • Loop - Actions
          • For each (Integer TempInteger) from 1 to IntegerInteger_Chain[AD_LoopInteger], do (Actions)
            • Loop - Actions
              • Set Hook_Point = (Position of AD_Hook_Dummy[TempInteger])
              • Set ChainElement_Point = (Position of Unit_Chain[TempInteger])
              • Set ChainElement_DistanceToHook = (Distance between ChainElement_Point and Hook_Point)
              • Set AD_Caster_P[AD_MUI_Integer] = (Position of AD_Caster[AD_MUI_Integer])
              • Set X2 = (Distance between AD_Caster_P[AD_MUI_Integer] and Hook_Point)
              • Set C1 = (Distance between ChainElement_Point and Hook_Point)
              • Set Real = ((C1 + (Real(AD_NoobInteger))) / X2)
              • Set AD_Chain_Next_Point = (ChainElement_Point offset by Real towards (Percentage mana of AD_Caster[AD_MUI_Integer]) degrees)
              • Unit - Move Unit_Chain[TempInteger] instantly to AD_Chain_Next_Point
              • Custom script: call RemoveLocation(udg_ChainElement_Point)
              • Custom script: call RemoveLocation(udg_AD_Chain_Next_Point)
      • Game - Display to (All players) the text: (String((Number of units in AD_Hooks_UG[AD_MUI_Integer])))
      • Custom script: call RemoveLocation(udg_AD_Caster_P[udg_AD_MUI_Integer])
      • Custom script: call RemoveLocation(udg_AD_Jump_Next_Point)
Thanks you!
 
Status
Not open for further replies.
Top