Ok, in the massassi chat room last night, LordVader told me that it was possible to create a thing from random positions around a ghost object instead of just having it come from one point from the ghost object. He said it involved some math and stuff like that. I'm not that good in cog to do it so i was wondering if Lordvader or someone else could help me with this?
Here's the equasion Loardvader gave to me: Distance is: d = sqrt(sqr(x1-x2) + sqr(y1-y2) + sqr(z1-z2))
And here is the cog i want to apply it to:
------------------
Generating Electro Vibes™ for the masses on Massassi
Go To: EL3CTROPROSE or DEEPMATRIX or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
[This message has been edited by Electro (edited October 31, 2001).]
Here's the equasion Loardvader gave to me: Distance is: d = sqrt(sqr(x1-x2) + sqr(y1-y2) + sqr(z1-z2))
And here is the cog i want to apply it to:
Code:
## Jedi Knight Cog Script ###########################################
# #
# rain.cog #
# #
# This is a cog that should maske realistic rain in levels, #
# the rain is generated by chost objects positioned near eachother #
# #
# [E3 - 29/10/2001] #
# #
#####################################################################
flags=0x240
# .........
symbols
template rainsprite
thing ghost0
thing ghost1
thing ghost2
thing ghost3
thing ghost4
thing ghost5
thing ghost6
thing ghost7
thing ghost8
thing ghost9
message startup
message pulse
message timer
end
# ========================================================================================
code
startup:
SetPulse(0.6);
Return;
# ........................................................................................
pulse:
SetTimerEx(Rand(), 1, 0, 0);
SetTimerEx(Rand(), 2, 0, 0);
SetTimerEx(Rand(), 3, 0, 0);
SetTimerEx(Rand(), 4, 0, 0);
SetTimerEx(Rand(), 5, 0, 0);
SetTimerEx(Rand(), 6, 0, 0);
SetTimerEx(Rand(), 7, 0, 0);
SetTimerEx(Rand(), 8, 0, 0);
SetTimerEx(Rand(), 9, 0, 0);
SetTimerEx(Rand(), 10, 0, 0);
Return;
# ........................................................................................
timer:
if(GetSenderID() == 1)
{
CreateThing(rainsprite, ghost0);
}
else
if(GetSenderID() == 2)
{
CreateThing(rainsprite, ghost1);
}
else
if(GetSenderID() == 3)
{
CreateThing(rainsprite, ghost2);
}
else
if(GetSenderID() == 4)
{
CreateThing(rainsprite, ghost3);
}
else
if(GetSenderID() == 5)
{
CreateThing(rainsprite, ghost4);
}
else
if(GetSenderID() == 6)
{
CreateThing(rainsprite, ghost5);
}
else
if(GetSenderID() == 7)
{
CreateThing(rainsprite, ghost6);
}
else
if(GetSenderID() == 8)
{
CreateThing(rainsprite, ghost7);
}
else
if(GetSenderID() == 9)
{
CreateThing(rainsprite, ghost8);
}
else
if(GetSenderID() == 10)
{
CreateThing(rainsprite, ghost9);
}
Return;
# ........................................................................................
end------------------
Generating Electro Vibes™ for the masses on Massassi
Go To: EL3CTROPROSE or DEEPMATRIX or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
[This message has been edited by Electro (edited October 31, 2001).]
Generating Electro Vibes™ for the masses on Massassi
Go To: BiTsToRm Forums or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
Go To: BiTsToRm Forums or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
![http://forums.massassi.net/html/biggrin.gif [http://forums.massassi.net/html/biggrin.gif]](http://forums.massassi.net/html/biggrin.gif)