View unanswered posts | View active topics It is currently Wed Dec 11, 2024 8:28 am



Reply to topic  [ 12 posts ] 
 Actor:GibThis circumstances 
Author Message
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post 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.


Wed Feb 18, 2009 11:23 pm
Profile YIM
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post 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.


Thu Feb 19, 2009 2:07 am
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post 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?


Thu Feb 19, 2009 4:40 am
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post 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.


Thu Feb 19, 2009 5:12 am
Profile YIM
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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.


Thu Feb 19, 2009 5:54 am
Profile WWW
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post 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...


Thu Feb 19, 2009 6:11 am
Profile YIM
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post 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.


Thu Feb 19, 2009 4:34 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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.


Thu Feb 19, 2009 6:31 pm
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post 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?


Thu Feb 19, 2009 7:00 pm
Profile YIM
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post 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


Thu Feb 19, 2009 9:06 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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.


Thu Feb 19, 2009 9:11 pm
Profile
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post 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"


Thu Feb 19, 2009 11:44 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ] 

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.045s | 13 Queries | GZIP : Off ]