View Full Version : Swinging Pendulum
SM_Trige
06-07-2005, 01:06 AM
Alright, I requested this in the past and got nothing, so hopefully I can get something this time since I will need it to finish my level. I need a cog that is similar to the rotating door cog. The cog should automatically move a 3DO between two set positions non-stop. It should start moving at the start of the game. To anyone who can make this possible, my thanks goes out to you and your work.
Daft_Vader
06-07-2005, 01:44 AM
Here's a thread I posted a while back asking for almost exactly the same thing: *clicky* (http://forums.massassi.net/vb/showthread.php?s=&threadid=30411&highlight=pendulum#post426830)
I don't know if it will be of any help to you. I never did quite get these cogs working before, so hopefully someone can come along and explain it to both of us. ;)
SM_Trige
06-07-2005, 02:42 PM
Yeah, that cog's not doing me any good. Once the game starts, it freezes. It may be because my thing has only 2 frames and the cog needs 3. But since I have extremely little cogging experience, it could be a whole swarm of things. Hopefully, someone can shed some light on this,
Edward
06-07-2005, 03:58 PM
Make your Pendulum with the center at the top. Give it 2 frames in which you make a difference in one of the rotation axis.
Then give it the following code:
# Swinging Pendulum
#
# By Edward
symbols
message startup
message pulse
thing pendulum
flex axis=.5 local
flex val=-.01 local
end
#
code
startup:
sleep(1); // Just a little delay...
SetPulse(0.01);
return;
pulse:
axis=axis+val;
StopThing(pendulum);
RotatePivot(pendulum,1,axis);
if(axis>.5)
val=-.01;
else if(axis<-.5)
val=.01;
return;
end
I hope this is all there is to it... I might have missed out on something... I'm not sure... Hope it works.
/Edward
Daft_Vader
06-07-2005, 06:05 PM
So, did it work Trige?
SM_Trige
06-07-2005, 07:01 PM
No, there was some problem with it and the thing never moved. Edward said he must've missed something, so I'm assuming he'll check it over again if and when he gets around to it.
SM_Trige
06-08-2005, 07:45 PM
So, anyone else wanna take a stab at it? I don't want this to be like the last time I asked for it when people attempted, it didn't work and they just gave up.
Stormtrooper
06-08-2005, 08:54 PM
I made a half-functional one, it swung left, the back to the center, then left again rahter than right. I could try to fix it, but why not just use a looping keyframe and PlayKey()? It would make it much easier to set up.
Or you could just use 01simple_elev. Really, now... Moving back and forth between two key frames isn't the most complicated thing ever.
SG-fan
06-08-2005, 11:19 PM
But it's not just moving between frames. Its making it into a pendulum motion.
I messed with this for a grapple a while back, didn't work reliably. It worked in slowmo, but not at regular speed. That lead me to believe that JK doesn't have a fixed gravity, but a thrust that pushes down at regular (I hope) intervals.
The most I can help is don't try using thrusts/forces for this.
Um...the 3DO just needs a proper center at the point where you want the pendulum to spin. Then rotate it back and forth at intervals...not that hard.
SM_Trige
06-09-2005, 01:20 AM
Well how come no one told me that earlier? The axis point is already in the right position, I'm just not sure how to make it rotate.
SetThingRotate or something similar. Check DataMaster.
SG-fan
06-10-2005, 09:11 PM
I thought you already tried that. Guess I'm remembering someone else (we had something like 5 pendulum threads going at once a little while back)
The rotate thing should do the trick, but I've never used it before so I can only assume it works like Datamaster says it does.
SM_Trige
06-10-2005, 11:40 PM
Ah, well I'm mostly a Datamaster noob since I've never heard of it or seen it before. If someone could point me in the right direction, I'd appreciate it.
SG-fan
06-11-2005, 12:59 AM
This is a link to sabermaster's site, he made the Datamaster and other REALLY helpful cog tools. http://www.geocities.com/sabersdomain/files.html
Incase you don't know what Datamaster is, it is an organized list of every cog verb and flag known at the moment. Each verb has a description and tells you how to use it properly. Datamaster includes tutorials and other stuff that can be helpful.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.