Thread: Problem with projectiles

Results 1 to 3 of 3
  1. #1 Problem with projectiles 
    Registered Member Hexagon's Avatar
    Join Date
    May 2008
    Posts
    672
    Thanks given
    28
    Thanks received
    18
    Rep Power
    33
    any one know why it sightly goes high ?

    EDIT: forgot .gif loollo


    Code:
    	public void createboltProjectile(int casterY, int casterX, int offsetY,
    			int offsetX, int angle, int speed, int gfxMoving, int startHeight,
    			int endHeight, int MageAttackIndex) {
    		try {
    			outStream.createFrame(85);
    			outStream.writeByteC((casterY - (mapRegionY * 8)) - 2);
    			outStream.writeByteC((casterX - (mapRegionX * 8)) - 3);
    			outStream.createFrame(117);
    			outStream.writeByte(angle); // Starting place of the projectile
    			outStream.writeByte(offsetY); // Distance between caster and enemy
    			// Y
    			outStream.writeByte(offsetX); // Distance between caster and enemy
    			// X
    			outStream.writeWord(MageAttackIndex); // The NPC the missle is
    			// locked on to
    			outStream.writeWord(gfxMoving); // The moving graphic ID
    			outStream.writeByte(startHeight); // The starting height
    			outStream.writeByte(endHeight); // Destination height
    			outStream.writeWord(51); // Time the missle is created
    			outStream.writeWord(speed); // Speed minus the distance making it
    			// set
    			outStream.writeByte(4); // Initial slope
    			outStream.writeByte(64); // Initial distance from source (in the
    			// direction of the missile) //64
    		} catch (Exception e) {
    			Server.logError(e.getMessage());
    		}
    	}
    Code:
    createboltProjectile(absY, absX, offsetY, offsetX, 50, speed, arrow, 43,
    				31, attacknpc + 1);
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Oct 2009
    Posts
    1,621
    Thanks given
    15
    Thanks received
    67
    Rep Power
    0
    Change the 50 in this:
    Code:
    createboltProjectile(absY, absX, offsetY, offsetX, 50, speed, arrow, 43, 31, attacknpc + 1);
    Increase it for a higher angle, lower it to make it have a lower angle.
    Reply With Quote  
     

  3. #3  
    Registered Member Hexagon's Avatar
    Join Date
    May 2008
    Posts
    672
    Thanks given
    28
    Thanks received
    18
    Rep Power
    33
    i was using the same code on a delta sorce and it was working, but i realized delta is shi
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •