Answers for "psych engine how to make an arrow that shows image"

1

psych engine how to make an arrow that shows image

function onCreate()
	--Iterate over all notes
	for i = 0, getProperty('unspawnNotes.length')-1 do
		--Check if the note is an Instakill Note
		if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'YOUR NOTE NAME' then
			setPropertyFromGroup('unspawnNotes', i, 'texture', 'gunpowder_assets'); --Change texture
			
			if getPropertyFromGroup('unspawnNotes', i, 'mustPress') then --Doesn't let Dad/Opponent notes get ignored
				setPropertyFromGroup('unspawnNotes', i, 'ignoreNote', true); --Miss has no penalties
			end
		end
	end
	--debugPrint('Script started!')
end

-- Function called when you hit a note (after note hit calculations)
-- id: The note member id, you can get whatever variable you want from this note, example: "getPropertyFromGroup('notes', id, 'strumTime')"
-- noteType: The note type string/tag
-- isSustainNote: If it's a hold note, can be either true or false
function goodNoteHit(id, direction, noteType, isSustainNote)
	if noteType == 'YOUR NOTE NAME' then
		curHealth = getProperty('health')
		setProperty('health', curHealth - 0.3);
		playSound('gphit');
		makeLuaSprite('image', 'gpsplash', 100, -100);
		addLuaSprite('image', true);
		doTweenColor('hello', 'image', 'FFFFFFFF', 0.5, 'quartIn');
		setObjectCamera('image', 'other');
		runTimer('wait', 3.5); --waits 3.5 seconds then the image displayed dissapears
		-- put something here if you want

	end
end

function onTimerCompleted(tag, loops, loopsleft) --image fades away until it's opacity is 0
	if tag == 'wait' then
		doTweenAlpha('byebye', 'image', 0, 0.3, 'linear');
	end
end

function onTweenCompleted(tag)
	if tag == 'byebye' then
		removeLuaSprite('image', true); --image dissapears
	end
end
Posted by: Guest on April-21-2022

Code answers related to "psych engine how to make an arrow that shows image"

Browse Popular Code Answers by Language