We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, so, I've been thinking. "I can make a winning icon in lua", and I'm trying to make it but for some reason the addLuaSprite isn't working
Here code (bf code):
function onCreate() makeAnimatedLuaSprite('newIconP1', 'Icons New/newicon-' .. getProperty('boyfriend.curCharacter'), 0, 0) setProperty('iconP1.alpha', 0) setObjectCamera('newIconP1', 'hud') setProperty('newIconP1', getProperty('iconP1.x')) setProperty('newIconP1.y', getProperty('iconP1.y')) setProperty('newIconP1.flipX', true) addAnimationByPrefix('newIconP1', 'nor', 'normal', 1, true) addAnimationByPrefix('newIconP1', 'loss', 'loss', 1, true) addAnimationByPrefix('newIconP1', 'win', 'win', 1, true) addLuaSprite('newIconP1', true) end function onUpdate() debugPrint('ip1 x & y: ' .. getProperty('newIconP1.x') .. ' & ' .. getProperty('newIconP1.y')) debugPrint('ip2 x & y: ' .. getProperty('newIconP2.x') .. ' & ' .. getProperty('newIconP2.y')) doTweenX('moveIP1X', 'newIconP1', getProperty('iconP1.x'), 0.5, 'sineOut') doTweenY('moveIP1Y', 'newIconP1', getProperty('iconP1.y'), 0.5, 'sineOut') health = getProperty('health') if health >= 1.6 then objectPlayAnimation('newIconP1', 'win', true) elseif health <= 1.5 and health >= 0.7 then objectPlayAnimation('newIconP1', 'nor', true) elseif health <= 0.6 then objectPlayAnimation('newIconP1', 'loss', true) end end
Here code (dad/opponent code):
function onCreate() makeAnimatedLuaSprite('newIconP2', 'Icons New/newicon-' .. getProperty('dad.curCharacter'), 0, 0) setProperty('iconP2.alpha', 0) setObjectCamera('newIconP2', 'hud') setProperty('newIconP2', getProperty('iconP2.x')) setProperty('newIconP2.y', getProperty('iconP2.y')) addAnimationByPrefix('newIconP2', 'nor', 'normal', 1, true) addAnimationByPrefix('newIconP2', 'loss', 'loss', 1, true) addAnimationByPrefix('newIconP2', 'win', 'win', 1, true) addLuaSprite('newIconP2', true) end function onUpdate() doTweenX('moveIP2X', 'newIconP2', getProperty('iconP2.x'), 0.5, 'sineOut') doTweenY('moveIP2Y', 'newIconP2', getProperty('iconP2.y'), 0.5, 'sineOut') health = getProperty('health') if health >= 1.6 then objectPlayAnimation('newIconP2', 'loss', true) elseif health <= 1.5 and health >= 0.7 then objectPlayAnimation('newIconP2', 'nor', true) elseif health <= 0.6 then objectPlayAnimation('newIconP2', 'win', true) end end
If you know the problem, it would help a lot
Lua
Linux
Nop
The text was updated successfully, but these errors were encountered:
No one is going to help anyway
Sorry, something went wrong.
No branches or pull requests
Describe your problem here.
Hello, so, I've been thinking. "I can make a winning icon in lua", and I'm trying to make it but for some reason the addLuaSprite isn't working
Here code (bf code):
Here code (dad/opponent code):
If you know the problem, it would help a lot
Are you modding a build from source or with Lua?
Lua
What is your build target?
Linux
Did you edit anything in this build? If so, mention or summarize your changes.
Nop
The text was updated successfully, but these errors were encountered: