Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : 2 for 1 gears
New Topic New Poll Post Reply
Poster Message
averagemoe
Level: Smiter
Avatar
Rank Points: 487
Registered: 03-22-2012
IP: Logged

File: Interchangable gears.hold (33.5 KB)
Downloaded 23 times.
License: Public Domain
icon 2 for 1 gears (+3)  
Have you ever looked at the two options for animated gears provided in the TSS Custom Elements bonus pack and wished you didn't have to give them each their own identity in the custom character list? Have you ever thought, "Wouldn't it be more convenient if I could just have one custom character that could be either?"

The answer is no. I'm the only one who wants that because I'm a freaking weirdo.

And since I'm the only one who wants it, I made it myself. Why am I sharing this work publicly? Because, as previously established, I'm a freaking weirdo, who likes to occasionally show off how much of a freaking weirdo I am.

The point is, in this example hold, the two gear obstacles you see are the exact same type of NPC, both running the default script. The only difference is the "seed" on their northwest corners that Generate Entity-es the rest of the gear into existence. The one on the left is facing northwest, and the one on the right is facing due north. Other than that change in orientation, they're identical.

And it's all done with pure math. The script has no If statements to detect the orientation. Just adding to the initial _MyO value, and arranging the columns of the custom tileset in just the right order.

No need to thank me, because, like I said, I'm the only one who asked for this.

____________________________
There are two types of sheep in the world. Those who jump off a bridge when told to, and those who jump off a bridge when told not to. Don't be either.

[Last edited by averagemoe at 01-31-2022 09:28 PM]
01-31-2022 at 05:28 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : 2 for 1 gears
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.