Thread: Projectiles, how to bind the 'lockon' variable to something other than an entity.

Results 1 to 8 of 8
  1. #1 Projectiles, how to bind the 'lockon' variable to something other than an entity. 
    Banned
    Join Date
    Jan 2018
    Posts
    43
    Thanks given
    12
    Thanks received
    6
    Rep Power
    0
    I am using Elvarg based projectiles, I just wanted to send a projectile to a specific location rather than to an entity to follow or what not, when I try to set the lockon to 0 or 1 or something obscure the projectile just flops some random angle. Not going to the actual location it was constructed too.


    I am sure this is something someone must know about, I would appreciate any advice!

    Take care

    - Loses
    Reply With Quote  
     

  2. #2  
    🖤Runic Developer🖤
    Castiel's Avatar
    Join Date
    Apr 2013
    Posts
    1,752
    Thanks given
    564
    Thanks received
    288
    Rep Power
    609
    Bump
    Attached image
    Attached image
    Reply With Quote  
     

  3. #3  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    I believe only two entity types are supported, npc and player but I could be wrong. If the value < 0 it's an NPC, if > 0 then it's a player. When 0, yo must provide the angle, slope, start heigh, end height, etcetera which determines the projectile path.
    Reply With Quote  
     

  4. #4  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Quote Originally Posted by Jason View Post
    I believe only two entity types are supported, npc and player but I could be wrong. If the value < 0 it's an NPC, if > 0 then it's a player. When 0, yo must provide the angle, slope, start heigh, end height, etcetera which determines the projectile path.
    lock on:
    player = -player_index - 1
    npc = npc_index + 1

    to send to a location you simply use 0 and provide the location as normal, the rest of the arguments are required at all times.
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Quote Originally Posted by Stuart View Post
    lock on:
    player = -player_index - 1
    npc = npc_index + 1

    to send to a location you simply use 0 and provide the location as normal, the rest of the arguments are required at all times.
    thanks for the correction, appreciated
    Reply With Quote  
     

  7. #6  
    Banned
    Join Date
    Jan 2018
    Posts
    43
    Thanks given
    12
    Thanks received
    6
    Rep Power
    0
    Quote Originally Posted by Stuart View Post
    lock on:
    player = -player_index - 1
    npc = npc_index + 1

    to send to a location you simply use 0 and provide the location as normal, the rest of the arguments are required at all times.
    I have the lockon set to 0

    https://i.gyazo.com/b6aa232cda6df453...c2d872af35.mp4
    //start/end/lockon/projectile/speed/delay/startheight/endheight/curve
    delay = character.executeProjectile(new Projectile(character.getPosition(), target.getPosition(), 0, 1481, 65, 35, 50, 35, 45));
    Reply With Quote  
     

  8. #7  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by Loses View Post
    I have the lockon set to 0

    https://i.gyazo.com/b6aa232cda6df453...c2d872af35.mp4
    //start/end/lockon/projectile/speed/delay/startheight/endheight/curve
    delay = character.executeProjectile(new Projectile(character.getPosition(), target.getPosition(), 0, 1481, 65, 35, 50, 35, 45));
    Seems like the last projectile at the end of the video worked (the grey one), why not try and copy what you did for that?


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  9. #8  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Quote Originally Posted by Loses View Post
    I have the lockon set to 0

    https://i.gyazo.com/b6aa232cda6df453...c2d872af35.mp4
    //start/end/lockon/projectile/speed/delay/startheight/endheight/curve
    delay = character.executeProjectile(new Projectile(character.getPosition(), target.getPosition(), 0, 1481, 65, 35, 50, 35, 45));
    you're not sending the right region (packet 85)
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 2
    Last Post: 07-25-2010, 11:50 PM
  2. How to make the compass back to normal?
    By Scratch in forum Help
    Replies: 9
    Last Post: 05-09-2010, 01:09 AM
  3. Replies: 2
    Last Post: 02-09-2010, 08:44 PM
  4. Replies: 2
    Last Post: 07-23-2009, 08:35 PM
  5. Replies: 5
    Last Post: 05-24-2008, 03:02 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •