Please or Register to create posts and topics.

Hacking Orientation of Frankencube?

I'm seeing a lot of several-month-old threads, but I'm remaining hopeful that someone's still watching. I'm working on my third Peti map and would like to work with frankencubes as a sort of story/functional element, but would like to be able to change the direction they're facing when placed on the map.

I saw a thread here with a hack for the reflector cubes -- adding a line of code that will allow you to change the orientation of them upon being released from the cube dropper. However, with the frankencube's inability to be redirected from the beginning, my struggle must start there.

Would anyone here happen to know enough about the editor to implement some way to perform a similar "reflector-cube-like" orientation manipulation, but with the frankencubes?

Thank you for your time,
Bugg

Would they need to come from droppers, or could they be on the ground at the start of the test?

Falsi sumus crusto!

As you said, with a quick modification to editoritems.txt droppers can be rotated (which would apply to all cube dropper forms, since they are all the same item). A dropper wouldn't actually work too well, since they're liable to fall over after the dispensing, and they have to be in cube form to fit inside the dropper, making it hard to release them facing the right way to be able to walk.

I've made quite a few items for the PTI as an addon to the BEE2, one of which is a cube clamp which will release frankenturrets facing the right way. It can't redispense the cube though (in the same orientation, I have a different item to allow the respawn but that's in the form of a regular dropper). I think I'll make a custom item for this purpose, which would respawn frankenturrets ready to walk.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
FelixGriffin wrote:
Would they need to come from droppers, or could they be on the ground at the start of the test?

It won't be necessary for them to come from the droppers. There will be fizzlers separating multiple rooms, but I am able to make the room so they're unable to be destroyed.

TeamSpen210 wrote:
As you said, with a quick modification to editoritems.txt droppers can be rotated (which would apply to all cube dropper forms, since they are all the same item). A dropper wouldn't actually work too well, since they're liable to fall over after the dispensing, and they have to be in cube form to fit inside the dropper, making it hard to release them facing the right way to be able to walk.

I've made quite a few items for the PTI as an addon to the BEE2, one of which is a cube clamp which will release frankenturrets facing the right way. It can't redispense the cube though (in the same orientation, I have a different item to allow the respawn but that's in the form of a regular dropper). I think I'll make a custom item for this purpose, which would respawn frankenturrets ready to walk.

That would be a fantastic addition! (Unfortunately, not so fantastic for me, however, since I am running Portal 2 on a Mac.) If need be, I've been working on a few practical applications for ensuring they drop upright, but my only real priority is gaining the ability to choose the direction they face. Would it at all be possible to walk me through adding that functionality?

The file you want to edit is in "portal 2/portal2_dlc2/scripts/editoritems.txt". In the properties of Portal 2 in Steam there's a button to open the Portal 2 install folder. Search "ITEM_DROPPER_CUBE" to find the section that defines the cube dropper. A few lines below there'll be a line saying:
"MovementHandle" "HANDLE_NONE"

Change it to:
"MovementHandle" "HANDLE_4_DIRECTIONS"
After restarting Portal 2, droppers should be rotatable. (4 directions, to be precise. HANDLE_36_DIRECTIONS, used for turrets and laser cubes is very messed up on walls or ceilings.)

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

I kept it the 4 cardinals as per your suggestion with the cube dropper, and added 36 to the franken cube itself. After a quick test, everything is working swimingly! That's been a big help, thank you! I guess there isn't much reason to procrastinate much longer. I just hope I don't run out of assets again by trying to add too many mini-game and "cinematic" gimmicks...

Thanks again!