I wanna colour someone white when they are hit with a projectile.

Author Topic: I wanna colour someone white when they are hit with a projectile.  (Read 4394 times)

Yeah. I'm making a weapon, and i want to make the person i hit get coloured white for a few seconds :D Is it possible?

Yes....

Code: [Select]
function WeaponImage::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
%col.setskinname('white');
}

Dunno about the setskinname, as you might need to set several things white...but...meh. At least you know where to put it. :P

Its actually:

Code: [Select]
function weaponImage::onCollision(%this, %obj, %col, %fade, %pos, %norm)
{
      if(%col.getClassName() $= "Player")
      {
            %col.setTempColor("1 1 1 1",ammountOfTimeHereInMS);
      }
}

Ammount of time is the length of time you want them to stay that color. If you want them to be permanent, either set it to a very high number, or make a script to loop through all the player nodes and set them to white.

Yeah. I'm making a weapon, and i want to make the person i hit get coloured white for a few seconds :D Is it possible?

Did it not occur to you that spraycan does it finely, so anything can?  -.-
Just copy it and tweak it so it only works for one colour value, and change the projectile and/or model.

Use common sense pls  :cookieMonster:

Yeah. I'm making a weapon, and i want to make the person i hit get coloured white for a few seconds :D Is it possible?

Did it not occur to you that spraycan does it finely, so anything can?  -.-
Just copy it and tweak it so it only works for one colour value, and change the projectile and/or model.

Use common sense pls  :cookieMonster:


Y halo thar, Mr *.DSO

Yeah. I'm making a weapon, and i want to make the person i hit get coloured white for a few seconds :D Is it possible?

Are you gonna shoot people with cum? :cookieMonster:

Its actually:

Code: [Select]
function weaponImage::onCollision(%this, %obj, %col, %fade, %pos, %norm)
{
      if(%col.getClassName() $= "Player")
      {
            %col.setTempColor("1 1 1 1",ammountOfTimeHereInMS);
      }
}

Ammount of time is the length of time you want them to stay that color. If you want them to be permanent, either set it to a very high number, or make a script to loop through all the player nodes and set them to white.

Perfect! I really don't want it to be permanent, that could make some people annoyed :P


Also:
Quote
Weren't you banned for saying "Get broadband" to the guy with 45k dialup?

...If i was, i didn't notice.
« Last Edit: March 07, 2007, 11:01:18 PM by Deathwish »

I downloaded the retail demo, which was a two hour download on 45k dialup, and when I tried to install it, it said it was corrupt after installing main.cs, and told me to download a fresh installer.

I'm downloading a fresh installer right now, but seriously, WHAT THE HELL.
Try using a download manager such as FlashGet

Get broadband.
Not helpful.  Tempted to ban.[/b]



Even if it was a temp ban, it should have been waaaaay longer then what you got...I mean, a ban should be long if it has to be implemented.....

I downloaded the retail demo, which was a two hour download on 45k dialup, and when I tried to install it, it said it was corrupt after installing main.cs, and told me to download a fresh installer.

I'm downloading a fresh installer right now, but seriously, WHAT THE HELL.
Try using a download manager such as FlashGet

Get broadband.
Not helpful.  Tempted to ban.[/b]
Even if it was a temp ban, it should have been waaaaay longer then what you got...I mean, a ban should be long if it has to be implemented.....

He said he was TEMPTED to ban. That means he wanted to, but he didn't bother.

lol, tempted, temp'ed, it's all good...I know what tempt meants I just saw "temp" and "ban" and thoughth tempban.....LOL

Tempt:
1. dispose or incline or entice to; "We were tempted by the delicious-looking food"
2. entice: provoke someone to do something through (often false or exaggerated) promises or persuasion; "He lured me into temptation"
3. give rise to a desire by being attractive or inviting; "the window displays tempted the shoppers"
4. charm: induce into action by using one's charm; "She charmed him into giving her all his money"
5. try to seduce
6. try presumptuously; "St. Anthony was tempted in the desert"
wordnet.princeton.edu/perl/webwn

Definations brought to you by Google Define

temptational tempting is temporarily temporal

It might just be me going mad but that makes sence.

Its actually:

Code: [Select]
function weaponImage::onCollision(%this, %obj, %col, %fade, %pos, %norm)
{
      if(%col.getClassName() $= "Player")
      {
            %col.setTempColor("1 1 1 1",ammountOfTimeHereInMS);
      }
}

Ammount of time is the length of time you want them to stay that color. If you want them to be permanent, either set it to a very high number, or make a script to loop through all the player nodes and set them to white.

It seems this code doesn't work... Should i change the weaponImage name for the projectile name, maybe?