Author Topic: Is there a way to make randomized kill messages?  (Read 1903 times)


I love how two people came into this thread, imply they know a solution, and didn't even so much as point him in the right direction. A+ job, 29.0!

I love how two people came into this thread, imply they know a solution, and didn't even so much as point him in the right direction. A+ job, 29.0!
this is how programmers do

...Do you?

This is a scripting help thread. You seem to have no actual idea what's going on.
3 solutions were added. Now it returns 1 of those 3 solutions using the
getRandom function. The selected solution was added to the pre existing damage function itself.

It's pretty loving simple to see what's going on here if you ask me. I was just
suggesting that maybe it would be better if yall took a step back so he could
understand what's goin on
« Last Edit: June 21, 2017, 04:29:22 PM by NAT3 »


Not everyone is going to posses the skills and knowledge required to create these kinds of systems and that is the reason why this board exists. You seemingly shamed him to purport your elite coding skills and brought nothing of value to the discussion.

I love how two people came into this thread, imply they know a solution, and didn't even so much as point him in the right direction. A+ job, 29.0!

Thanks.

He should try being more specific and explain more in detail, what he's trying to do. This helps us point him into the right direction.

"is there a way to write an essay?"

yes

"is there a way to workout my arms?"

yes

"is there a way to answer a phone call?"

yes

In the case of his question, I think my answer was valid enough.

It's pretty loving simple to see what's going on here if you ask me. I was just
suggesting that maybe it would be better if yall took a step back so he could
understand what's goin on
Maybe you should quit trying to cause drama for no reason and things would work fine here. Take it somewhere else. If you don't know anything about the code or have an idea, don't post.



Try this:
Code: [Select]
AddDamageType("RandKill1",   '%1 commit Self Delete',    '%2 murdered %1',1,1);
AddDamageType("RandKill2",   '%1 ended themselves',    '%2 pwnd %1',1,1);
AddDamageType("RandKill3",   '%1 opted out',    '%2 obliterated %1',1,1);

package RandomKillMessage
{
function GameConnection::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc)
{
%random = getRandom(1, 3);
%damageType = $DamageType::RandKill[%random];

Parent::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc);
}
};
ActivatePackage(RandomKillMessage);

Alternatively you could rewrite the function if you feel really motivated.
« Last Edit: June 21, 2017, 06:40:46 PM by Kyuande »

Try this:
Code: [Select]
AddDamageType("RandKill1",   '%1 commit Self Delete',    '%2 murdered %1',1,1);
AddDamageType("RandKill2",   '%1 ended themselves',    '%2 pwnd %1',1,1);
AddDamageType("RandKill3",   '%1 opted out',    '%2 obliterated %1',1,1);

package RandomKillMessage
{
function GameConnection::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc)
{
%random = getRandom(1, 3);
%damageType = $DamageType::RandKill[%random];

Parent::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc);
}
};
ActivatePackage(RandomKillMessage);

Alternatively you could rewrite the function if you feel really motivated.
I have no doubt this will work, I just need to test it... Locking for now.

Thanks.
He should try being more specific and explain more in detail, what he's trying to do. This helps us point him into the right direction.
"is there a way to write an essay?"
yes
"is there a way to workout my arms?"
yes
"is there a way to answer a phone call?"
yes
In the case of his question, I think my answer was valid enough.
get out of my thread

I don't think Table has any actual idea what's going on
3 solutions were added. Now it returns 1 of those 3 solutions using the
getRandom function. The selected solution was added to the pre existing damage function itself.

It's pretty loving simple to see what's going on here if you ask me. I was just
suggesting that maybe it would be better if yall took a step back so he could
understand what's goin on
you too go away