Author |
Message |
DoomTurkey
Joined: Thu Sep 24, 2009 2:45 am Posts: 68
|
Re: I'm Back... with more bomb-related question...
Geti wrote: why do you want it to do that? and if anything, SpriteAnimMode = 1 should work, but i dont think devices animate normally, though TDs might. I have the TDExplosive set to SpriteAnimMode = 1 but the animation doesn't turn on till the bomb is thrown. Anyway, I want to make it rotate cause the bomb I'm making is a glass sphere with a red dot circling inside the sphere.
|
Thu Oct 29, 2009 5:34 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: I'm Back... with more bomb-related question...
A Lua way to make the object rotate: Make a text file, paste this into it: Code: function Update(self) self.AngularVel = 10; -- negative number for clockwise rotation, positive for counter-clockwise end and save the file as "lua". Example name: rotatingscript.lua In your bomb code, add Code: [tab]ScriptPath = ModFolderName.rte/rotatingscript.lua Replace the "[tab]" with a tab. You can also adjust the "self.AngularVel" to change the rotation speed.
|
Thu Oct 29, 2009 10:17 pm |
|
|
DoomTurkey
Joined: Thu Sep 24, 2009 2:45 am Posts: 68
|
Re: I'm Back... with more bomb-related question...
I have no idea how to change file into lua format, cause when I name it rotate.lua the file still saves as .txt
This is a new computer using vista, and I've never used vista b4. Any1 help?
|
Tue Nov 03, 2009 2:58 am |
|
|
hax
Joined: Tue Aug 11, 2009 2:42 am Posts: 321 Location: On an iceberg typing away...
|
Re: I'm Back... with more bomb-related question...
"SAVE AS" then put .lua in the name
Last edited by hax on Tue Nov 03, 2009 3:10 am, edited 1 time in total.
|
Tue Nov 03, 2009 3:06 am |
|
|
DoomTurkey
Joined: Thu Sep 24, 2009 2:45 am Posts: 68
|
Re: I'm Back... with more bomb-related question...
that didn't work...XO
mkay, nvm, fix'd (by googling 4 answers)
|
Tue Nov 03, 2009 3:07 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: I'm Back... with more bomb-related question...
this wont work whilst it's in an actor's hand though. scripts aren't run on any attached objects, which a TDExplosive is when its in an actor's hand.
|
Tue Nov 03, 2009 4:01 am |
|
|
DoomTurkey
Joined: Thu Sep 24, 2009 2:45 am Posts: 68
|
Re: I'm Back... with more bomb-related question...
but I have a weapon mode called "Lightning Gun" that's animated while the actor's holding it? Isn't a weapon an attached item?
|
Tue Nov 03, 2009 4:43 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: I'm Back... with more bomb-related question...
yeah, its animated without lua, in ini. you could try animmode 4, which is what weapons with windup use (if i remember correctly) but im not sure if it will work for bombs.
|
Tue Nov 03, 2009 5:07 am |
|
|
DoomTurkey
Joined: Thu Sep 24, 2009 2:45 am Posts: 68
|
Re: I'm Back... with more bomb-related question...
you mean the AnimMode thing's not a binary variable?
|
Wed Nov 04, 2009 12:57 am |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
Re: I'm Back... with more bomb-related question...
Binary means 1 or 0. It can be at this time 0-6
|
Wed Nov 04, 2009 2:59 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: I'm Back... with more bomb-related question...
usually the 1 or 0 variables are called "boolean" but whatever. no, spriteanimmode is an int, 0-6. you should look in the luadocs for the properties of a MOS.
|
Wed Nov 04, 2009 3:48 am |
|
|
DoomTurkey
Joined: Thu Sep 24, 2009 2:45 am Posts: 68
|
Re: I'm Back... with more bomb-related question...
I tried 0-7, all without a movement from the object.
Maybe I should just animate it by making sprites?
|
Thu Nov 05, 2009 5:25 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: I'm Back... with more bomb-related question...
well, as the animmodes only work if you've got sprites, and dont affect lua scripts at all, yes that would be a good idea. if 4 works the same way that it does with guns, it will only animate whilst charging the throw. getting devices to animate in ways the game never intended is difficult though.
|
Thu Nov 05, 2009 6:16 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: I'm Back... with more bomb-related question...
Do emitters work on TDExplosives? I'm pretty sure they work on HDFirearms... If so, you could have it animated that way...
|
Thu Nov 05, 2009 7:06 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: I'm Back... with more bomb-related question...
actually yes, they do work (my molotov has an emitter, albeit a useless one at the moment), i really should have thought of that (it's how the fire works on mine and the vanilla molotov). yeah, look at the molotov coding for how to get it to animate, but you'll need to set down a base sprite for it to animate over for the atomgroup, because otherwise you'll get a very distinct lack of interactions with MOs and terrain.
|
Thu Nov 05, 2009 10:53 am |
|
|
|