Data Realms Fan Forums http://45.55.195.193/ |
|
Actor:GibThis circumstances http://45.55.195.193/viewtopic.php?f=73&t=13762 |
Page 1 of 1 |
Author: | Darlos9D [ Wed Feb 18, 2009 11:23 pm ] |
Post subject: | Actor:GibThis circumstances |
So, I've got something pretty simple going here in UpdateActivity(): Code: for actor in MovableMan.Actors do if actor.PresetName == "D55GrenadeLauncher Fired 2" then actor:GibThis() end end If I spawn the actor with that name in edit mode, it immediately gibs like it should. When I actually fire it out of a weapon though, nothing happens. I'm not sure whats going on. |
Author: | robolee [ Thu Feb 19, 2009 2:07 am ] |
Post subject: | Re: Actor:GibThis circumstances |
I too am wondering how to make something gib when shot using lua, my attempts to make the actor gib using emitters have failed. |
Author: | Daman [ Thu Feb 19, 2009 4:40 am ] |
Post subject: | Re: Actor:GibThis circumstances |
Perhaps being fired from a weapon causes him to not be considered an actor, but a particle or something else? I don't know, how are you firing him out of a weapon? |
Author: | Darlos9D [ Thu Feb 19, 2009 5:12 am ] |
Post subject: | Re: Actor:GibThis circumstances |
Daman wrote: Perhaps being fired from a weapon causes him to not be considered an actor, but a particle or something else? I don't know, how are you firing him out of a weapon? Well, I set it up so the round that the gun fires is an AHuman that I made to look like a small grenade. I'm not sure how else one might do it. Though I guess you could do some sort of "fire an emitter which emits the projectile" deal. Or even "fire a dropship which gibs and has the actor in it." Though I'm not trying to fire something that needs to be controlled by the player. I know it acts like an actor though, despite how its set up. I have a sort of "proximity trigger" effect, where the actor has an invisible gun that it fires at a nearby enemy, and the recoil causes the actor to gib (this is how you do it, Robolee! though you should be able to do it with emitters as well... start a thread in mod making about it). That works about half the time, so obviously the actor is working as an actor. I guess it has something to do with the thing where firing actors makes them on your team, but uncontrollable (and you can't see their health). This might also cause the script not to register it when its looking for actors. The whole reason I was doing this was to try to make a more reliable proximity trigger effect. But I need my script to actually find the actor before that can happen. Here's a question: can you use GibThis on MOSRotatings and the like? Or does it only work on full-blown actors? I guess the same question could be applied to whether or not you can find MOSRotatings with MoveableMan.Actors, since everything else would rely on that. |
Author: | TheLastBanana [ Thu Feb 19, 2009 5:54 am ] |
Post subject: | Re: Actor:GibThis circumstances |
I can't recall if GibThis works on them, but MOSRotatings would be under MovableMan.Particles, and weapons are under MovableMan.Items. Other than that, I'm not really sure how one would fix your problem. The way CC's engine is set up, there are some quirks with actors and such right now, such as not being able to control objects that have parents in many cases. It could be that due to the way that rounds are spawned, it suffers from the same quirk. |
Author: | Darlos9D [ Thu Feb 19, 2009 6:11 am ] |
Post subject: | Re: Actor:GibThis circumstances |
TheLastBanana wrote: I can't recall if GibThis works on them, but MOSRotatings would be under MovableMan.Particles, and weapons are under MovableMan.Items. Other than that, I'm not really sure how one would fix your problem. The way CC's engine is set up, there are some quirks with actors and such right now, such as not being able to control objects that have parents in many cases. It could be that due to the way that rounds are spawned, it suffers from the same quirk. sigh... well, I guess I'll move onto something else until there are further builds. I'll try adding new controls, like secondary fire... |
Author: | robolee [ Thu Feb 19, 2009 4:34 pm ] |
Post subject: | Re: Actor:GibThis circumstances |
when shot from a gun it becomes a particle, so it will never find it by looking in MovableMan.Actors... Also GibThis() still doesn't seem to work on it, but you can still do other stuff like changing it's position. |
Author: | Grif [ Thu Feb 19, 2009 6:31 pm ] |
Post subject: | Re: Actor:GibThis circumstances |
When shot from a gun it's probably grouped as a round. Have a gun that fires nothing, but has an emitter attached to the muzzleflash. Problem solved? GibThis should work fine in that occasion. |
Author: | Darlos9D [ Thu Feb 19, 2009 7:00 pm ] |
Post subject: | Re: Actor:GibThis circumstances |
Grif wrote: When shot from a gun it's probably grouped as a round. Have a gun that fires nothing, but has an emitter attached to the muzzleflash. Problem solved? GibThis should work fine in that occasion. I find it comical that I'll have to do other hackish things to get Lua to work the way I want. I thought the point was to avoid all that. Also, won't the emitter emit in the wrong direction if you face left? |
Author: | Daman [ Thu Feb 19, 2009 9:06 pm ] |
Post subject: | Re: Actor:GibThis circumstances |
Darlos9D wrote: Grif wrote: When shot from a gun it's probably grouped as a round. Have a gun that fires nothing, but has an emitter attached to the muzzleflash. Problem solved? GibThis should work fine in that occasion. I find it comical that I'll have to do other hackish things to get Lua to work the way I want. I thought the point was to avoid all that. Also, won't the emitter emit in the wrong direction if you face left? The point is the ♥♥♥♥ doesn't work anyways. It's not lua's fault. actually it is because there is no all-inclusive function we can run to return all entities(items, actors, particles, etc) and then use IsActor etc to derive what something is |
Author: | Grif [ Thu Feb 19, 2009 9:11 pm ] |
Post subject: | Re: Actor:GibThis circumstances |
Darlos9D wrote: I find it comical that I'll have to do other hackish things to get Lua to work the way I want. I thought the point was to avoid all that. Also, won't the emitter emit in the wrong direction if you face left? Well, just use whatever method you need to to have it emit an actor. Even just gibbing one *should* work. |
Author: | robolee [ Thu Feb 19, 2009 11:44 pm ] |
Post subject: | Re: Actor:GibThis circumstances |
when I said when shot it becomes a particle I meant that you can then find it by doing "for whatever in MovableMan.Particles" |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |