Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Keyboard functions are not supported because the game polls and synchronizes only a number of inputs, as well as handling keyboard<->gamepad mapping (see Input API). I may add keyboard_check alias for these in future just for convenience, but they would only work for the existing keys, which would be confusing.

keyboard_key_press probably isn't going to be implemented, since the game polls multiple physical inputs (as mentioned) for every virtual input, so I'd have to add hacks for that.

Surface functions are not supported because surfaces are volatile (can vanish anytime), therefore are not something that would work consistently when playing online (where each player has their own things)

In general, scripting system supports functions that are deterministic by nature (math, data structures, etc.) or could be forced to work in a deterministic way. The list of supported functions can be found in %LOCALAPPDATA%/nuclearthrone/api/api.gml after doing /gmlapi. There might be some additions in future, but these are generally time-consuming to implement, and there are already too many things to do as-is.

Deleted 7 years ago

Thanks for the reply, I feel silly for not having checked the input API page more thoroughly. Would there be any method or function for simulating a player pressing a button virtually, in the manner of having a keyboard_key_press in that player object? Thanks once again!

Depends on what exactly you are trying to do - e.g. for movement you could just adjust hspeed\vspeed and clamp it to (0, maxspeed) range like the game does. For shooting weapons, there's player_fire() function. Swapping weapons is just exchanging values of "wep" and "bwep" (and a few other variables like "reload", "breload" - see fields.gml).