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 → Swinging Pendulum
Swinging Pendulum
2005-06-06, 10:06 PM #1
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.
Who made you God to say "I'll take your life from you"?
2005-06-06, 10:44 PM #2
Here's a thread I posted a while back asking for almost exactly the same thing: *clicky*

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. ;)
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2005-06-07, 11:42 AM #3
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,
Who made you God to say "I'll take your life from you"?
2005-06-07, 12:58 PM #4
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:

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
Edward's Cognative Hazards
2005-06-07, 3:05 PM #5
So, did it work Trige?
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2005-06-07, 4:01 PM #6
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.
Who made you God to say "I'll take your life from you"?
2005-06-08, 4:45 PM #7
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.
Who made you God to say "I'll take your life from you"?
2005-06-08, 5:54 PM #8
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.
2005-06-08, 7:37 PM #9
Or you could just use 01simple_elev. Really, now... Moving back and forth between two key frames isn't the most complicated thing ever.
2005-06-08, 8:19 PM #10
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.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2005-06-08, 10:18 PM #11
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.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2005-06-08, 10:20 PM #12
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.
Who made you God to say "I'll take your life from you"?
2005-06-08, 10:26 PM #13
SetThingRotate or something similar. Check DataMaster.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2005-06-10, 6:11 PM #14
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.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2005-06-10, 8:40 PM #15
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.
Who made you God to say "I'll take your life from you"?
2005-06-10, 9:59 PM #16
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.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"

↑ Up to the top!