Author |
Message |
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Changing the direction of a bullet
Yeah, that fixed it. But still, the code won't work.
|
Thu Feb 24, 2011 3:30 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Changing the direction of a bullet
Have you tried setting Self.Velocity instead of Self.Velocity's components?
|
Thu Feb 24, 2011 10:45 am |
|
|
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
|
Re: Changing the direction of a bullet
Lua on an MOPixel will only work if it is an actor, replace AddAmmo or AddEffect by AddActor and it will work.
|
Thu Feb 24, 2011 12:48 pm |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
Re: Changing the direction of a bullet
Mehman wrote: replace AddAmmo or AddEffect by AddActor and it will work. What, since when? I know for a fact that non-AddActor MOPixels can have ScriptPaths and work perfectly fine, I just made a mod that utilizes that. Furthermore, I know that Lua can affect MOPixels that are not AddActor, otherwise none of the bubbleshield mods that use Lua would work now.
|
Thu Feb 24, 2011 1:46 pm |
|
|
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
|
Re: Changing the direction of a bullet
Sorry, I thought this because I had problems with lua scripts not working on non actor MOPixels a long time ago, it must have been changed since then, or maybe it was just a mistake of mine, if the script doesn't work then check the lua console and see if they are any errors.
|
Thu Feb 24, 2011 2:42 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Changing the direction of a bullet
Guess I'll think more of this later. I've tried many codes that haven't worked.
|
Fri Feb 25, 2011 5:09 am |
|
|
Kettenkrad
Joined: Mon Oct 25, 2010 5:51 am Posts: 1198 Location: Sydney
|
Re: Changing the direction of a bullet
Rather than using a script, would it work if you fire a MOSR with an AEmitter on it that fires at a 90 ( or -90 whatever) degree angle? Or something like that anyway. Use the IgnoreParent script though so you don't violently explode yourself.
|
Sat Mar 12, 2011 11:56 am |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Changing the direction of a bullet
If you were going to do it that way you might as well do it via GlobalAccScalar.
|
Sun Mar 13, 2011 3:20 pm |
|
|
Kettenkrad
Joined: Mon Oct 25, 2010 5:51 am Posts: 1198 Location: Sydney
|
Re: Changing the direction of a bullet
But GlobalAccScalar is only relevant to the scene's gravity, if he wanted a lightsaber, (wait, he does, right?) it'll be based on the weapon's aiming angle. I think.
|
Sun Mar 13, 2011 10:27 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Changing the direction of a bullet
Hurrrrrrrrrr.
There's no real reason why those scripts shouldn't work. Try making the MOPixels MOSprites.
|
Sun Mar 13, 2011 10:44 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Changing the direction of a bullet
MOSprites? Now WTF is that?
And why the script won't work? This is so frustrating.
|
Mon Mar 14, 2011 8:19 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Changing the direction of a bullet
Movable Object Movable Object Pixel Movable Object Sprite Movable Object Sprite Rotating
Basically swap a pixel for a 1 by 1 bitmap.
|
Mon Mar 14, 2011 9:33 pm |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: Changing the direction of a bullet
Try and get the weapon's angle and rotate the velocity with that. (Assuming you are trying to make a lightsaber) something like this should work. Code: <Get the weapon>
self.angle = self.<weapon>.RotAngle
self.Vel = Vector(0,10):RadRotate(self.angle)
|
Mon Mar 14, 2011 9:36 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Changing the direction of a bullet
RadRotate? What's that command for?
Anyway, I'll try the code later.
|
Tue Mar 15, 2011 7:20 pm |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: Changing the direction of a bullet
|
Tue Mar 15, 2011 10:39 pm |
|
|
|