View Single Post
Old 05-01-2016   #30
Rumia1
Backseat Developer
 
Rumia1's Avatar
Default

So I'm trying to make a script that allows the player to fire the boss laser with A_Boss1Laser. However, every time I run the code here:
Code:
addHook("ThinkFrame", do
	for player in players.iterate
		if player.mo.skin ==  "sonic"
			player.ability2 = CA2_NONE
			if (player.cmd.buttons & BT_USE)
				"A_Boss1Laser(MT_LASER)"
			end
		end
	end
end)
it comes up with WARNING: lasertest.lua:6: attempt to call a number value
Hook removed.

clearly this script has no numbers in it, except MT_LASER which has a thing number but MT_LASER is supposed to substitute for that.

If I remove the quotes around A_Boss1Laser, it ends up spitting out the same error and depending on which version of the script I use when trying to impliment it into the megamari level lua code (from S_Quickman2 edited by me to specifically use this), it either breaks EVERY mobj in the game as soon as I try using the key (when using no quotes), or it gives the same error as before when using it (when using quotes).
__________________
Quote:
Originally Posted by Cirno
Egguman-senpai...
Rumia1 is offline   Reply With Quote