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 → Wheeles aren't workin'!
Wheeles aren't workin'!
2004-01-19, 9:32 AM #1
Wheele 0-7 aren't turning! I've changed revolve to 0.5.
Code:
# 32 wheeler.
#
# By Edward
symbols

message		startup
message		pulse
message		touched

thing		wheele0		mask=0x606
thing		wheele1		mask=0x606
thing		wheele2		mask=0x606
thing		wheele3		mask=0x606
thing		wheele4		mask=0x606
thing		wheele5		mask=0x606
thing		wheele6		mask=0x606
thing		wheele7		mask=0x606
thing		wheele8		mask=0x606
thing		wheele9		mask=0x606
thing		wheele10	mask=0x606
thing		wheele11	mask=0x606
thing		wheele12	mask=0x606
thing		wheele13	mask=0x606
thing		wheele14	mask=0x606
thing		wheele15	mask=0x606
thing		wheele16	mask=0x606
thing		wheele17	mask=0x606
thing		wheele18	mask=0x606
thing		wheele19	mask=0x606
thing		wheele20	mask=0x606
thing		wheele21	mask=0x606
thing		wheele22	mask=0x606
thing		wheele23	mask=0x606
thing		wheele24	mask=0x606
thing		wheele25	mask=0x606
thing		wheele26	mask=0x606
thing		wheele27	mask=0x606
thing		wheele28	mask=0x606
thing		wheele29	mask=0x606
thing		wheele30	mask=0x606
thing		wheele31	mask=0x606

thing		axel0
thing		axel1
thing		axel2
thing		axel3
thing		axel4
thing		axel5
thing		axel6
thing		axel7


vector		axis

flex		revolv=1.0

sound		splat
sound		crunch

int		i		local

int		l=1		local

end
#
code
startup:
	for(i=0; i<32; i=i+1)
	{
		StopThing(wheele0);
		Rotate(wheele0,axis);
	}
	for(i=0; i<8; i=i+1)
	{
		StopThing(wheele0);
		Rotate(axel0,axis);
	}
	SetPulse(revolv);
return;
pulse:
	for(i=0; i<32; i=i+1)
	{
		StopThing(wheele0);
		Rotate(wheele0,axis);
	}
	for(i=0; i<8; i=i+1)
	{
		StopThing(wheele0);
		Rotate(axel0,axis);
	}
return;
touched:
	for(i=0; i<32; i=i+1)
	{
		if(GetSenderRef()==wheele0)
		{
			StopThing(wheele0);
			l=PlaySoundThing(splat,GetSourceRef(),1,-1,10,0x80);
			ChangeSoundPitch(l,.5,0.01);
			DamageThing(GetSourceRef(),1000,0x41,GetSourceRef());
			l=PlaySoundThing(crunch,GetSourceRef(),1,-1,10,0x80);
			ChangeSoundPitch(l,.5,0.01);
			Rotate(wheele0,axis);
		}
	}
return;
end

Please Help! All wheeles were turning before I added the axels.

Oh, and is there anyway that I can Rotate() things the opposite way?

/Edward
------------------
"I am the signature virus! Copy me into your signature so that I can take over the world! Moohahahee!"

Happy?
Edward's Cognative Hazards
2004-01-19, 5:53 PM #2
is rotate() a verb? Maybe setthingrotvel would work better?

------------------
Duel Zero : Released the beta. Probably the end of it. Not to worry though, I'm working on Randsaber, which is a lot better.
2004-01-19, 9:02 PM #3
Is rotate a verb... I think it is, but I'm not sure... Didn't you find it in DM? [http://forums.massassi.net/html/rolleyes.gif]

[This message has been edited by Edward (edited January 20, 2004).]
Edward's Cognative Hazards
2004-01-20, 4:11 AM #4
yes rotate is a verb, rotate(thing, vector);
ill check your code, stand by for action!

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-01-20, 5:09 AM #5
i have no idea why.. but it appears that the stopthings where running every few microseconds on the first eight things when ever the axles code was in the cog...

anyway, i changed it a little and it seems to work fine for me. so it should for you
Code:
# 32 wheeler.
#
# By Edward
symbols
message      startup                                                          
message      pulse                                                            
message      touched                                                          
thing        wheele0                            mask=0x606                    
thing        wheele1                            mask=0x606                    
thing        wheele2                            mask=0x606                    
thing        wheele3                            mask=0x606                    
thing        wheele4                            mask=0x606                    
thing        wheele5                            mask=0x606                    
thing        wheele6                            mask=0x606                    
thing        wheele7                            mask=0x606                    
thing        wheele8                            mask=0x606                    
thing        wheele9                            mask=0x606                    
thing        wheele10                           mask=0x606                    
thing        wheele11                           mask=0x606                    
thing        wheele12                           mask=0x606                    
thing        wheele13                           mask=0x606                    
thing        wheele14                           mask=0x606                    
thing        wheele15                           mask=0x606                    
thing        wheele16                           mask=0x606                    
thing        wheele17                           mask=0x606                    
thing        wheele18                           mask=0x606                    
thing        wheele19                           mask=0x606                    
thing        wheele20                           mask=0x606                    
thing        wheele21                           mask=0x606                    
thing        wheele22                           mask=0x606                    
thing        wheele23                           mask=0x606                    
thing        wheele24                           mask=0x606                    
thing        wheele25                           mask=0x606                    
thing        wheele26                           mask=0x606                    
thing        wheele27                           mask=0x606                    
thing        wheele28                           mask=0x606                    
thing        wheele29                           mask=0x606                    
thing        wheele30                           mask=0x606                    
thing        wheele31                           mask=0x606                    
thing        axel0                                                            
thing        axel1                                                            
thing        axel2                                                            
thing        axel3                                                            
thing        axel4                                                            
thing        axel5                                                            
thing        axel6                                                            
thing        axel7                                                            

vector       axis                                                             
flex         revolv=1.0                                                       
sound        splat                                                            
sound        crunch                                                           
int          i                                  local                         
int          b                                  local  
int          l=1                                local                         
end                                                                           
#
code
startup:
for(i=0; i<32; i=i+1)
{
Rotate(wheele0,axis);
}
for(b=0; b<8; b=b+1)
{
Rotate(axel0,axis);
}
SetPulse(revolv);
return;


pulse:
for(i=0; i<32; i=i+1)
{
Rotate(wheele0,axis);
}
for(b=0; b<8; b=b+1)
{
Rotate(axel0,axis);
}
return;


touched:
for(i=0; i<32; i=i+1)
{
if(GetSenderRef()==wheele0)
{
StopThing(wheele0);
l=PlaySoundThing(splat,GetSourceRef(),1,-1,10,0x80);
ChangeSoundPitch(l,.5,0.01);

DamageThing(GetSourceRef(),1000,0x41,GetSourceRef());
l=PlaySoundThing(crunch,GetSourceRef(),1,-1,10,0x80);

ChangeSoundPitch(l,.5,0.01);
Rotate(wheele0,axis);
}
}
return;
end



------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-01-20, 5:10 AM #6
aaaaaaahr!!!
Rotate(wheele0,axis);
we rotating wheels: wheele01, wheele02 edt.. try wheele

------------------
The miners of Kiith Somtaaw sacificed much, and risked all. For their efforts they were brought into the inner most circle of Hiigaren power. Naabal, S'jet, and Sobanii bowed before them. And from that day to this, Somtaaw's children have been known to one and all as Beastslayers..
2004-01-20, 5:11 AM #7
oh, i found the best settings where to ahve the vector on (0/0/360) and the revolve on 1..

also if you want the wheels to go backwards set the vel to (0/0/-360)

its so simple its fun [http://forums.massassi.net/html/biggrin.gif]

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-01-20, 5:13 AM #8
Quote:
<font face="Verdana, Arial" size="2">Originally posted by EH_AceCSF:
aaaaaaahr!!!
Rotate(wheele0,axis);
we rotating wheels: wheele01, wheele02 edt.. try wheele

</font>


i have no idea where you heard taht ace but your inncorect

when you use a JK array like that
wheele0

your telling JK to replace the 0 with the number in i havent tryed it your way.. but your still inncorect, as it works fine this way

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-01-20, 5:38 AM #9
Actually, that's not strictly true PJB [http://forums.massassi.net/html/wink.gif] :

Quote:
<font face="Verdana, Arial" size="2">
It's convenient to have the variable's name match up with the index number that is used to call it. But variables don't have to be named that way. For example:

int var local
int red local
int green local
int blue local
int yellow local
int orange local

In this case, var[4] can be used to access the variable, yellow.
</font>


- courtesy of The DataMaster's Tutorial on Arrays [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-01-20, 5:54 AM #10
Quote:
<font face="Verdana, Arial" size="2">Originally posted by [SF]pjb:
oh, i found the best settings where to ahve the vector on (0/0/360) and the revolve on 1..

also if you want the wheels to go backwards set the vel to (0/0/-360)

its so simple its fun [http://forums.massassi.net/html/biggrin.gif]
</font>


When I try 360, and no loop, it stops after a second.
Negative value for reverse? Have you tied it? This is for JK.
Edward's Cognative Hazards
2004-01-20, 6:25 AM #11
Setthingrotvel keeps going forever untill you stop it.

I'd give it a try.

Also, you keep spelling it "wheele," that can't help anything.

------------------
Duel Zero : Released the beta. Probably the end of it. Not to worry though, I'm working on Randsaber, which is a lot better.
2004-01-21, 6:47 AM #12
dont you have to have move-phsics and type=cog in your template for that?

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-01-21, 6:58 AM #13
Quote:
<font face="Verdana, Arial" size="2">
When I try 360, and no loop, it stops after a second.
Negative value for reverse? Have you tied it? This is for JK.
</font>


the loop needs to be one second i said that.

and yes i belive negative values work, ill check just incase, but i think they do

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?

↑ Up to the top!