View unanswered posts | View active topics It is currently Mon Dec 30, 2024 10:01 pm



Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next
 Changing the direction of a bullet 
Author Message
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post 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
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Oct 25, 2010 5:51 am
Posts: 1198
Location: Sydney
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Oct 25, 2010 5:51 am
Posts: 1198
Location: Sydney
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Changing the direction of a bullet
http://nottarga.com/heart/wiki/index.ph ... #RadRotate


Tue Mar 15, 2011 10:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 31 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.043s | 13 Queries | GZIP : Off ]