Frictional Games Forum (read-only)

Full Version: In need of a creative solution!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey guys Smile

I've started modeling a tablet as part of my puzzle in the teamnesia project. While doing the tablet I realised that I had forgotten an important part. The tablet looks like this:
Spoiler below!

[Image: 9XqFF.jpg]


You are supposed to place planets/stars at the "holes" in the rings. The planets/stars are items I have made. The three rings are all supposed to be individually rotated. I will copy the rotation of the crank wheels for that.

How will I be able to rotate the stars/planets once in place - ergo keeping them in place at the holes in the rings?

Some thoughts around this:
- Simply placing a stuck entity there will make it stay at the same location.
- I thought of using the:
AddAttachedPropToProp(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);

Is that the way to go? If anyone has input/guidelines on working with this command I would appreciate it.

Thanks Smile

------------------------------------- Case closed ----------------------------------------------------------

I tried using:
AddAttachedPropToProp(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);

And it appears to work for the purpose I need. If anything else comes up concerning this I'll "reopen" the thread.
Sticky areas.
Sticky areas won't work for this particular problem. A sticky area will stay in the same place. It won't move with the movements of the rings :/

Fell into that trap right?
I'm sorry, but I do not know how to do this yet, but I think this command may help.

RotatePropToSpeed(string& asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string& asOffsetArea);

asName - internal name
afAcc - acceleration
afGoalSpeed - desired speed
afAxisX - rotation around X axis
afAxisY - rotation around Y axis
afAxisZ - rotation around Z axis
abResetSpeed - determines whether the speed is resetted after goal speed is reached
asOffsetArea - the area to rotate around, if ””, then the center of the body is used
Hmm.. I guess you could use that command to rotate the stars/planets. But then you would have to mirror their speed to the speed of the rings, which is controlled by the player. I think that's a little beyond my level Smile I'll look into it if attach doesn't work.
Don't forget the z position parameter for AddAttachedProptoProp is broken.
If you break the connection, enable another sticky area and disable the previous or something like that, wouldn't it work?
I'm opening it up again. I have failed to solve this.

AddAttachedProp: Doesn't work. The prop doesn't move around with the wheels.

Sticky-Areas: Doesn't work. The prop doesn't move around with the wheels.

If anyone has a suggestion I'd be glad to try it. Right now I'm simply going to use another type of puzzle.
What if you use 10 different areas, block_box entities and non-uniform circular motion equations to calculate the angular speed and angular acceleration every time you rotate the rings by 16 degrees? And then, use RotatePropToSpeed with the calculated speed and acceleration to rotate the planets?

This method NEEDS a part of the rings to be able to collide with the areas without the entire ring doing it. That's why I propose adding something similar to a block_box entity on the rings in the Model Editor.

Also, the areas should be really thin and placed like if they were the diameter of the rings. The ending result should look like a pizza.

Finally, I would recomend the use of two tablets instead of only one. A big one in wich the players are supoused to place the planets, and a small one used to rotate the rings.

When the player rotates a ring on the small tablet, collide callbacks between the 10 different areas and the block_box entity use the N-UCM equations and a timer (by using GetTimerTimerLeft) to calculate the afAcc and afGoalSpeed variables used by the RotatePropToSpeed function. Then, you use this function to move the rings on the big tablet AND the planets at the same time.

If you use 20 areas, the distance between them would be reduced to 8 degrees, making the rotation of rings and planets more accurate.

This is the only way I can think of to get your puzzle to work. Although It might prove to be a bit difficult to get it right.

By the way, I apologize for any grammatical errors. English is not my first language.


Wow, my first post is longer than I expected... Big Grin

EDIT: Angular acceleration, not tangential.
What model editor are you using, Acies? o.o
Pages: 1 2