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



Reply to topic  [ 10 posts ] 
 AEmitter Damage 
Author Message
User avatar

Joined: Fri Aug 19, 2011 4:02 pm
Posts: 40
Reply with quote
Post AEmitter Damage
First of all, hello everyone!
show lenghty Introduction with pictures and stuff


Here I stumbled over the problem, that the AEmitters that the gun shoots, don't deal damage!
I read through the forums lookign for inforamtion, mostly people had the problem hat the AEmitters travel trought the enemies cuz of the Atomgroups.
It is realy hard to find consisten information about Atomgroups. I think I know how to use them, don't hessitat to post information about them though ;)
Anyways, my current solution for the AEmitter Damage is to emit MOPixels with verry low lifetime, but when the Aemitter gets stuck in a enemie, it causes instant death.

Is there a way to make AEmitters deal damage/cause wounds.
Or moreover, is there a COMPLETE documentation somewhere, the wiki is far away from Complete?
Any help is welcome ;)


Fri Aug 19, 2011 6:49 pm
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: AEmitter Damage
AEmitter can't cause wounds on their own, seeing as they're MOSRotatings with some specialization. If you want wounds, you'd need to use the emitting small MOPixels method. To make them deal more damage, you'll need to up their mass and the speed they are fired at. Cortex Command doesn't have any abstracted "damage" value, it's calculated from the mass, angle, and speed of the impacting projectile. MOPixels also have sharpness, and so they are the only thing that can cause wounds.

The only documentation that exists is on the wiki, and in the minds of modders, so feel free to ask questions on a point if the wiki isn't helping.


Fri Aug 19, 2011 9:43 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: AEmitter Damage
Technically, you could use a tad of Lua to make an MOPixel behave somewhat like an AEmitter. This would definitely make the nail wound people, though it might look odd if you were to fire multiple nails at once (so as to multiply the damage done). This could be countered by dimming down the effects, but yeah. Allow me to pull a script out of my butt:
Code:
function Update(self) -- The script is run every frame
   local effect = CreateMOPixel("<particle name goes here>") -- Tell the game what we want to spawn
   effect.Pos = self.Pos -- Make it directly on top of the nail
   MovableMan:AddMO(effect); -- Add the particle
end

The MOPixel part can be subbed with any class name (MOSParticle, MOSRotating...). If multiple particles are needed, you can just copy-paste the three lines in the middle, but you should probably change the name (effect) if you do. In case you don't know how to add scripts, just go like:
Code:
ScriptPath = <script path goes here>

Anywhere in the code on the MOPixel.


Fri Aug 19, 2011 10:57 pm
Profile WWW
User avatar

Joined: Fri Aug 19, 2011 4:02 pm
Posts: 40
Reply with quote
Post Re: AEmitter Damage
@Duh102_:
The emitting method can still cause too much damage. You know, when the emitter gets stuck in the target and keeps spamming out the MOPixels :/
About the thing with the damage calculation, for example my Railgun got a verry heavy projectile (shot by using a light emitter that semits the heavy projectiel itself).
These heavy projectiles can deal damage, but only because they reach the GibImpulseLimit of a Actor. This means that they either kill what they hit or don't do anything.
For my nailgun, which is supposed to fire a load of nails that bounce around dealing minimal damage, these two "instant death" methods don't quite cut it :/

@Shook:
I had no look into lua scripts yet, the thing you posted does not seem to complex though.
The problem is not that I want to emit something, let me clarify my situation some more:

The originaly I just wanted to use a sprite for the nailgun-projectile, it was not supposed to spawn anything, so a MOParticle was just right.
The problem with that was, that MOParticles can't be alingned to the flight direction via...
Code:
OrientToVel = 1

... which is only aviable within AEmitters, thats why I used one of them.

So either I would need to orient a MOParticle into the flight direction or Attach a MOPixel infront of the AEmitter.
If it was possible to attach a Mopixel (via pin or parenting?), one pixle infront of the actual sprite (via offset vectors or so) all problems would be solved :P


Sat Aug 20, 2011 10:36 am
Profile WWW
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: AEmitter Damage
Well, you could always do what the Coalition Heavy Sniper used to do and make the gun fire an AEmitter (FireVelocity 1, OrientsToVel 0 should do), which then fires an AEmitter for the visuals and an MOPixel for the hurts. This has the disadvantage of the shots not inheriting your velocity, and can hit yourself, but it's pretty easy to make. Plus, you can make some really snazzy firing effects this way.

Alternatively, have a look at the Coalition Heavy Sniper Lua, if you want. It even has a few comments to clarify things.


Sun Aug 21, 2011 6:09 pm
Profile WWW
User avatar

Joined: Fri Aug 19, 2011 4:02 pm
Posts: 40
Reply with quote
Post Re: AEmitter Damage
The Coalition Heavy Sniper was actualy the first weapon I had a look at, hehe :)
It shoots the MOPixel for the damage and a AEmitter with the same speed right behind it.
AEmitter can bounce off, like I want it for my needler but the MOPixel can only hit once :/

Where is that .lua script for the Heavy sniper? I can't seem to find it.


Sun Aug 21, 2011 7:56 pm
Profile WWW
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: AEmitter Damage
Should be in the same folder as the INI (called HeavySniper.lua or something), though you probably have to enable the viewing of file extensions, if you haven't already. Lua files can be opened with Notepad too, by the way. :U
Also, to enable file extensions (if you haven't already):
Control panel --> Folder options --> View --> Uncheck "hide extensions..."

Also, i'm pretty sure the Heavy Sniper used to do that AEmitter trick, but it has changed to the more effective Lua code we see now, what with the advent of scriptable attachables. Better that way, anyhow.


Sun Aug 21, 2011 9:20 pm
Profile WWW
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: AEmitter Damage
Hi and welcome. :)
Will this one feature in your mod? <3


That's the finest pistol I've ever seen. Damn.


Mon Aug 22, 2011 2:17 pm
Profile
User avatar

Joined: Fri Aug 19, 2011 4:02 pm
Posts: 40
Reply with quote
Post Re: AEmitter Damage
Gotcha! wrote:
Hi and welcome. :)
Will this one feature in your mod? <3


That's the finest pistol I've ever seen. Damn.


[hype]Oh! Oh! The creator of the unitec mod is talking to me! :O[/hype]


Hehe, sure, if I manage to .lua script some melee attack for it ;)
I am currently working on some characters for my mod
Image

I plan to add a Halo "scorpion" tank to my mod too, if I find the time. Mind if I use your Tanks code as a template? ;p

EDIT:
Uh, I want to turn off those E-mail notifications for thread replies... can't find the option though :/

@Shook
The "HeavySniper.lua"? doesn't that just do the smoke-effects?
EDIT2:
@Shook
Oh it seems to also create the damage-MOPixel, accelerating it the same ammount the "Round" got.
Isn't that just the same the old Sniper did? Maybe a little more precise than guessing the weights/speeds to make them fly "inside" each other, but nothing realy different.


Mon Aug 22, 2011 2:51 pm
Profile WWW
User avatar

Joined: Sun Aug 09, 2009 9:26 am
Posts: 1633
Reply with quote
Post Re: AEmitter Damage
That looks pretty freakin rad. For melee on the revolver, I've seen it done using an AEmitter along the blade of the bayonet, that lets you just stab ♥♥♥♥♥es with it. Not quite sure how it's done, I don't mod, myself.


Mon Aug 22, 2011 8:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.034s | 16 Queries | GZIP : Off ]