View unanswered posts | View active topics It is currently Sun Dec 01, 2024 4:40 am



Reply to topic  [ 14 posts ] 
 Friendly Fire = On? 
Author Message
User avatar

Joined: Fri May 28, 2010 2:54 am
Posts: 38
Location: U.S.A.
Reply with quote
Post Friendly Fire = On?
I have always enjoyed each and every build of CC that came out, but Build 27, while fun, took away the one thing that made this game like a toybox for me: Friendly fire.

Sometimes, when I feel like relaxing, bullshitting around with weapons from various mods, or just play around with CC like a digital lego set, I would use the freetime mod and do that.

I was just wondering if there is a way to toggle friendly fire on in anyway, and if so, I would like to request a mod for it.


Tue Jul 10, 2012 6:21 am
Profile WWW

Joined: Fri Dec 30, 2011 3:33 am
Posts: 276
Reply with quote
Post Re: Friendly Fire = On?
It can be done pretty easily, it's merely time-consuming: add IgnoresTeamHits = 0 to the bullets in the INIs.


Tue Jul 10, 2012 6:33 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: Friendly Fire = On?
Is IgnoresTeamHits exposed to Lua/not read only? If so you could turn it back on mid-game.


Tue Jul 10, 2012 5:03 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Friendly Fire = On?
I'm pretty sure it's exposed and not read-only, looking at some of the scripts I have here.


Tue Jul 10, 2012 6:01 pm
Profile YIM
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: Friendly Fire = On?
And that property is attached to the round or the particle?


Tue Jul 10, 2012 6:26 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Friendly Fire = On?
In this case it's being set as part of creating an AEmitter.

viewtopic.php?f=1&t=31082 may be clearer/more helpful than I am.


Tue Jul 10, 2012 6:38 pm
Profile YIM

Joined: Fri Dec 30, 2011 3:33 am
Posts: 276
Reply with quote
Post Re: Friendly Fire = On?
It's attached to the MO (whatever MO, period) and it's exposed to Lua.

It's better to set it in the particles's flags at runtime; perhaps this can be done via PresetMan :-)


Tue Jul 10, 2012 6:46 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Friendly Fire = On?
If there is a way to turn this into a mod I would worship this mod and the mod maker for eternity.
Gawd, I SO MISS friendly fire. :cry:


Tue Jul 10, 2012 7:40 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: Friendly Fire = On?
Code:
function Create(self)
    self.TargetMO;
end

function Update(self)
    for i = 1, MovableMan:GetMOIDCount() - 1 do
        self.TargetMO = MovableMan:GetMOFromID(i);
        self.TargetMO.IgnoresTeamHits = true;
    end
end


This looks and smells like a really bad script.


Tue Jul 10, 2012 11:33 pm
Profile

Joined: Fri Dec 30, 2011 3:33 am
Posts: 276
Reply with quote
Post Re: Friendly Fire = On?
That won't work, I don't think.

What I'm doing is invoking it in Create(), but you'd have to have a script for every single particle in the game. It'd be faster / easier to use PresetMan and iterate through every single Preset, if a particle type, change the Preset's value for to true. See documentation of AddPreset.


Wed Jul 11, 2012 12:46 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: Friendly Fire = On?
AddPreset only works from file readers (IE .inis), and outputs as Entities, so unless the entity is an MO (which it doesn't have to be, it can be a TerrainObject instead), you can't apply the IgnoresTeamHits. Last I checked, there wasn't an "IsMO()" function for it either.


Wed Jul 11, 2012 6:27 pm
Profile
User avatar

Joined: Fri May 28, 2010 2:54 am
Posts: 38
Location: U.S.A.
Reply with quote
Post Re: Friendly Fire = On?
So are any of the above methods actually work for toggling friendly fire, or is it not there yet and we have to wait for a hero to take on this quest?


Sun Aug 12, 2012 3:30 am
Profile WWW

Joined: Sat Nov 24, 2012 8:07 pm
Posts: 8
Reply with quote
Post Re: Friendly Fire = On?
Why doesn't someone who knows lua and all different kinds of codes to compare B26 and 1.0 to find out what makes it friendly fire off?


Sat Nov 24, 2012 10:23 pm
Profile
User avatar

Joined: Fri Jun 10, 2011 4:37 am
Posts: 201
Location: Oregon, USA
Reply with quote
Post Re: Friendly Fire = On?
Because there is nothing in B26 to compare it too, because there was friendly fire in B26, and nothing changed it, I believe it was hard coded in B26. So it be like comparing it to nothing. Maybe someone should just PM Data, he'll probably know.


Wed Nov 28, 2012 5:26 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 14 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.033s | 13 Queries | GZIP : Off ]