Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → SendMessageExRadius?
SendMessageExRadius?
2002-02-10, 1:36 AM #1
What does this MotS library function do? It's used in all the force power COGs as such:
Code:
        // Send a "force disturbance"...
         if(!IsMulti())
            SendMessageExRadius(GetThingPos(player), cost, 0x4, splash, 31, 0, 0, 0);


Apparently the parameters are:

vector center
flex radius
int (unknown purpose)
message (unknown purpose)
int/flex param0
int/flex param1
int/flex param2
int/flex param3

I didn't notice any effect this line had in SP. The message (splash) sent obviously isn't being sent to a cog, because there's no cog reference. So what could it be sending it to?
Dreams of a dreamer from afar to a fardreamer.
2002-02-10, 5:45 AM #2
maybe it sends a message to any things within a given radius.. dunno.
2002-02-10, 6:30 AM #3
But then why would the developers want a "Force disturbance" to make things within a radius splash as though they entered water? That doesn't make sense.
Dreams of a dreamer from afar to a fardreamer.
2002-02-10, 8:39 PM #4
Maybe splash is a variable? [http://forums.massassi.net/html/confused.gif]
-Hell Raiser
2002-02-10, 10:01 PM #5
No, it's not declared in the symbols section.

I was hoping to use this line to send a message to players within a thing's radius... I guess I'll have to calculate eveything manually.

What's the algebraic equation for a sphere again?
(x-a)^2+(y-b)^2+(z-c)^2 = R^2 I think...
Dreams of a dreamer from afar to a fardreamer.
2002-02-11, 7:50 AM #6
As it's used there, SendMessageExRadius() will call the splash message in the cog of any actor within the radius. I guess the syntax is:
Code:
SendMessageExRadius(pos, radius, mask_flags, message, p0, p1, p2, p3);


Quote:
<font face="Verdana, Arial" size="2">I didn't notice any effect this line had in SP.</font>


Open up actor_rc.cog and put in a splash message containing a print(). Then play the New Republic base mission. When you use force jump, the cog of every actor within 20 JKUs will print a string.

Strange that LEC didn't use any "force disturbance" code in their actor cogs.

------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-02-11, 10:41 AM #7
Wow, if that's the case, it's exactly what I was looking for (provided it can message players in MP as well). I'll give it a shot. Thanks SaberMaster [http://forums.massassi.net/html/smile.gif]
Dreams of a dreamer from afar to a fardreamer.
2002-02-11, 11:47 PM #8
I think they wanted to make waters jump small, like heavy things walking beside a water pool, just to make things look cool, but ended up as nothing.

But then again, water surfaces usually don't have a cog attached, so what the nuts?

------------------
http://millennium.massassi.net - Millennium
Sniper Arena! - Enhancement Pack!
2002-02-12, 12:21 AM #9
Maybe they wanted to use the splash message because it was unused in actor cogs.
Dreams of a dreamer from afar to a fardreamer.
2002-02-12, 3:08 AM #10
I got it! I tested the cog and these are my final conclusions.

Code:
void SendMessageExRadius(vector center, flex radius, int thing_type_mask, message target_msg, flex param0, flex param1, flex param2, flex param3)


The message calls 'target_msg' in any thing's class cog within 'radius' JKUs from 'center'. The types of things that will be messaged are determined by setting 'thing_type_mask' flags.

This is an extremely useful function. It can be used to make very sophisticated cog-based AI: it can be used to notify actors of the player's actions. For instance, you could have Rodians run away if the player pulls out the conc.

[This message has been edited by Fardreamer (edited February 12, 2002).]
Dreams of a dreamer from afar to a fardreamer.
2002-02-12, 2:20 PM #11
heh, I guess I was right. sounds like a really neat verb..

↑ Up to the top!