Page 1 of 1

Spawn a NPC with a velocity?

Posted: Tue Feb 07, 2017 2:37 pm
by BananaCat
Im almost done with this piece of code, thanks to who helped! But how do you do it?

Re: Spawn a NPC with a velocity?

Posted: Tue Feb 07, 2017 2:39 pm
by BananaCat
ohn crud, I accidently put this in General...

Re: Spawn a NPC with a velocity?

Posted: Wed Feb 08, 2017 6:52 am
by PixelPest
When you spawn the NPC via NPC.spawn, set it to a local variable. Then do variable.speedX and/or speedY and set a value to it. For example:

Code: Select all

local npc = NPC.spawn(<args here>);
npc.speedX = #; 

Re: Spawn a NPC with a velocity?

Posted: Thu Feb 16, 2017 9:18 pm
by timocomsmbx2345
like a faster velocity than a thwomp?

Re: Spawn a NPC with a velocity?

Posted: Sat Feb 18, 2017 7:33 am
by MacDuckBeat
timocomsmbx2345 wrote:like a faster velocity than a thwomp?
Lmao, you made me laugh. :lol:
I think what the title says like spawning the NPC super fast. Eh ?