Hi!
Help, how do I make the Italic code work, when marble is touching a surface. Marble looks like this:
As it is now, the marble flies if I click fast enough. Please help!
/Edward
Oh, and also. How do I check to see if marble has collided with something. And specify if it is a thing or a surface...
[This message has been edited by Edward (edited March 09, 2004).]
[Fixed the horizontal scroll..]
[This message has been edited by GBK (edited March 11, 2004).]
Code:
activated:
player = GetSourceRef();
mode = GetSenderRef();
if (mode > 1)
Return;
PlaySoundThing(clickSound[mode], player, 1.0, -1.0, -1.0, 0x80);
if(mode==0)
{
if(out==0)
{
if(GetInv(player, 4) < 1 && out==0)
{
if(GetAutoSwitch() & 1)
{
SelectWeapon(player, AutoSelectWeapon(player, 1));
}
else
{
SelectWeapon(player, 1);
}
return;
}
// Cock arm back for throw.
if(preThrowTrack == -1 && prePOVThrowTrack == -1)
{
prePOVThrowTrack = jkPlayPOVKey(player, prePOVThrowAnim, 1, 0x14);
preThrowTrack = PlayMode( player, 38 );
ActivateWeapon(player, 0, mode);
}
}
else
{
if(IsCrouching(player))
{
SetThingVel(marble,VectorAdd(GetThingLVec(marble),'0 0 1'));
PlaySoundThing(bounce,marble,1,-1,10,0x80);
PlaySoundLocal(bounce,1,0,0x0);
}
else
{
PlaySoundLocal(shoot,1,0,0x0);
FireProjectile(marble,beem,shoot,-1,'0 0 0','0 0 0',0,0x60,360,360);
}
}
}Help, how do I make the Italic code work, when marble is touching a surface. Marble looks like this:
Quote:
<font face="Verdana, Arial" size="2">
+ball1 none orient=(0/0/0) type=actor model3d=ball1.3DO size=0.025 movesize=0.025 soundclass=ball1.snd height=0.025 damageclass=0x1 damage=100 move=physics collide=1 vel=(0.000000/2.000000/1.500000) physflags=0x227 mass=2 airdrag=0 surfdrag=10 buoyancy=1 typeflags=0x100161 explode=+ball_exp cog=ball.cog
</font>
+ball1 none orient=(0/0/0) type=actor model3d=ball1.3DO size=0.025 movesize=0.025 soundclass=ball1.snd height=0.025 damageclass=0x1 damage=100 move=physics collide=1 vel=(0.000000/2.000000/1.500000) physflags=0x227 mass=2 airdrag=0 surfdrag=10 buoyancy=1 typeflags=0x100161 explode=+ball_exp cog=ball.cog
</font>
As it is now, the marble flies if I click fast enough. Please help!
/Edward
Oh, and also. How do I check to see if marble has collided with something. And specify if it is a thing or a surface...
[This message has been edited by Edward (edited March 09, 2004).]
[Fixed the horizontal scroll..]
[This message has been edited by GBK (edited March 11, 2004).]