Events example

Doesn't contain all events.

var module = rise.registerModule("Example", "An example description.")
script.handle("onUnload", function () {
	module.unregister()
})

// Called when you attack an entity
module.handle("onAttack", function(e) {
	return e
})

// Called when you say something in chat
module.handle("onChatInput", function(e) {
	return e
})

// Called when the player clicks
module.handle("onClick", function(e) {
	return e
})

// Called when the player attacks another entity and recieves hit slowdown
module.handle("onHitSlowDown", function(e) {
	return e
})

// Called when you jump
module.handle("onJump", function(e) {
	return e
})

// Called when you press a key
module.handle("onKeyboardInput", function(e) {
	return e
})

// Called a player is killed by you
module.handle("onKill", function(e) {
	return e
})

// Called when movement inputs are accessed
module.handle("onMoveInput", function(e) {
	return e
})

// Called pre motion
module.handle("onPostMotion", function(e) {
	return e
})

// Called pre motion
module.handle("onPreMotion", function(e) {
	return e
})

// Called pre update
module.handle("onPreUpdate", function(e) {
	return e
})

// Called when the 2d ui is drawn
module.handle("onRender2D", function(e) {
	return e
})

// Called when the 3d world is drawn
module.handle("onRender3D", function(e) {
	return e
})

// Called when the player is slowed down by an item
module.handle("onSlowDown", function(e) {
	return e
})

// Called at the start of the clients tick
module.handle("onTick", function(e) {
	return e
})

// Called when the client references inWater method
module.handle("onWater", function(e) {
	return e
})

// Called 20 times per second, just before the players movement is added for the current tick
module.handle("onStrafe", function(e) {
	print("Test") // Prints "Test" to console

	return e
})

Last updated