Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

How to Make One Projectile Spawn Centered

From EDukeWiki

You probably have seen that when some actor shoot the projectile looks like to come from right hand (excluding hard-coded actor like BOSS3). Here is the code to make the projectile spawn centered.

Gamevars:

gamevar X 0 0
gamevar Y 0 0

Add at actor code before the shoot command:

getactor[THISACTOR].x X
getactor[THISACTOR].y Y
shoot RPG

After use the event EVENT_EGS (it assumes that the actor shooting is MYENEMY):

onevent EVENT_EGS
  ifactor RPG
    ifspawnedby MYENEMY
    {
      setactor[THISACTOR].x X
      setactor[THISACTOR].y Y
    }
endevent

You also can use z coordinate togheder with x and y, but probably in a common enemy wich uses cstat as bocked, the projectile will come from his "feets" and hit himself.

Retrieved from "http://localhost../../../h/o/w/How_to_Make_One_Projectile_Spawn_Centered_62a5.html"

This page has been accessed 14 times. This page was last modified 16:27, 16 December 2006 by Tails *ORIGINAL*. Based on work by Anonymous user(s) of EDukeWiki.


[Main Page]
Main Page
Recent changes
Random page
EDuke32.com

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports