Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

(SOLVED)Projectile System in EA


WiseRock
 Share

Recommended Posts

> ok all of you stop playing around.(read borad rules DO NOT POST IF YOU CANT OR WONT HELP) >.>
>
> If you know this line then tell him. >.>

So why didn't u tell him?

In modGameEditors in ItemInit or something add a code that changes the value of the scroll bar with the value of Item(index).projectileammo. Check out the item rec for the correct data declaration.
Link to comment
Share on other sites

sry for double post but heres the code

heres the code

```
Public Sub DrawProjectile()

Dim Angle As Long, X As Long, Y As Long, I As Long

If LastProjectile > 0 Then

' ****** Create Particle ******

For I = 1 To LastProjectile

With ProjectileList(I)

If .Graphic Then

' ****** Update Position ******

Angle = DegreeToRadian * Engine_GetAngle(.X, .Y, .tx, .ty)

.X = .X + (Sin(Angle) * ElapsedTime * 0.3)

.Y = .Y - (Cos(Angle) * ElapsedTime * 0.3)

X = .X

Y = .Y

' ****** Update Rotation ******

If .RotateSpeed > 0 Then

.Rotate = .Rotate + (.RotateSpeed * ElapsedTime * 0.01)

Do While .Rotate > 360

.Rotate = .Rotate - 360

Loop

End If

' ****** Render Projectile ******

If .Rotate = 0 Then

Call RenderTexture(Tex_Projectile(.Graphic), ConvertMapX(X), ConvertMapY(Y), 0, 0, PIC_X, PIC_Y, PIC_X, PIC_Y)

Else

Call RenderTexture(Tex_Projectile(.Graphic), ConvertMapX(X), ConvertMapY(Y), 0, 0, PIC_X, PIC_Y, PIC_X, PIC_Y, , .Rotate)

End If

End If

End With

Next

' ****** Erase Projectile ****** Seperate Loop For Erasing

For I = 1 To LastProjectile

If ProjectileList(I).Graphic Then

If Abs(ProjectileList(I).X - ProjectileList(I).tx) < 20 Then

If Abs(ProjectileList(I).Y - ProjectileList(I).ty) < 20 Then

Call ClearProjectile(I)

End If

End If

End If

Next

End If

End Sub

```
Link to comment
Share on other sites

The code is fine,just redownload the engine you are using and replace item editor form in your src folder from the newly downloaded source,it should fix your problem

And add in the itemeditorinit :

Nameoftheprojectilescroll.value=item(index).projectileammo

I dont know what is the name of the projectile scroll so don t forget to replace it

Check itemrec for .projectileammo i don t know how it s declared neither.i m on mobile so can t check
Link to comment
Share on other sites

Ok how to fix this just download it again like Ryo sayd and then change:

Under this:

```

frmEditor_Item.scrlProjectileRotation.value = .Rotation

```
Add this:

```

frmEditor_Item.scrlProjectileAmmo.value = .Ammo

```
And that's how i fixed it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...