More commands

Dan1

Newbie
Jun 13, 2024
1
1
60
Hello, I have been having a blast playing this games. Howver, in my opinion, it would be better if there were more commands in the game like /kill , /tp etc. Something along the lines of /getstar and then navigating a menu of which level which star and also /getkey would be good. I dont know if programming these would be hard so pardon me if i have made an impossible or hard suggestion.
 
  • Like
Reactions: Erik01235

tl;dr:​

This may be possible but I am not a sm64coopdx dev so I have no clue. I may also be working on mod to add these features.
Mayhaps.

Long answer:​

Ironically, I've been working on a utility mod which adds most of these features.

I considered making a similar thread to this, suggesting the /tp, /kill, /getstar (key) commands, etc etc...
Oddly enough, I've been having trouble implementing some of those, for a not-very-easily solvable reason.
For example, with /tp, I have to force players to run the command twice-
Once, to teleport to the level the target is in,
Second time executing it, I set the position of the player executing the command to the target's coordinates.

After looking through the docs, I'm approximately 97% sure this is due to the game's original code.
It's likely this would have to go under some refactoring, new systems, etc...
If it were me, I would probably look at the current code, and try to determine how to add a new function allowing a player to teleport to not only a specific level, but a specific position within that level, and all that horribleness.

I tried doing something along those lines within my mod, and it did not work.

Which leads back to the native code refactoring hell I mentioned, which isn't exactly preferable.
However, seeing as I am not a sm64coopdx developer outside of mods, I cannot really elaborate and everything I've said up to this point is really just
speculation/wild guessing.

As such, if anyone sees it fit to correct me, please do. :geek:
Don't double post! Use that edit button! Post automatically merged:

Sunk managed to make a teleport script a while back- Here's a link to it. You'll have to join the discord first if you haven't already.
 
Last edited:
  • Like
Reactions: Erik01235
Once, to teleport to the level the target is in,
Second time executing it, I set the position of the player executing the command to the target's coordinates.
That’s because when you warp Mario you’re then wanting Mario to change position when Mario’s state is yet to be updated to the new level. Here’s a solution. Firstly, warp to level returns a Boolean that returns true if it suceeded. If it returns true, set a variable like tpOnWarp to the index you need to to to. Then, create a hook event for hook on warp. There, if tpOnWarp is not nil, then tp coords to that player and set tpOnWarp to nil. Wrote on my phone so may be messy lol
 

Users who are viewing this thread