✨ ARCHIVE MODE ✨
The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
We recommend you join our Discord server to get real-time response: Discord Invite Link
the way i had it was it would look for a lua file, if one didnt exist it looked for a dat file, if one didnt exist it freaks out and crashes like it does now if the dat doesnt existAh
and so we can either make a .dat or a .lua?
and it will run either of them properly?
yepah thats cool.
Is there a way in Lua to set up functions withing functions?
so we would type Textdisp(stuff) and it would read for the line seperators like it does now?
function ATTACKS_ROCK_ANCIENTPOWER_ATTACKING_ANIMATION()
if Attacks_Store == "1" then
AnimationSequenceBegin()
DoStatChanceAnimation(5, 0.0)
AnimationSequenceEnd()
Attacks_SetStore("0")
end
end
-- the p3d stat change animation, play during attack when you are going to gain stats, in hit when the target will.
-- does not include the start and end sequence calls, so it can be chained
-- change determines what animation you get and how many particles spawn
-- negative values will produce red particles that go down
-- positive values will produce blue particles that go up
-- the amount of particles spawned is based on change, 40 * change particles will be spawned.
-- start delay is the time in seconds it takes to start.
-- each update tick is 0.1 seconds so times more granular than 0.1 seconds will be in effect rounded up or down to the nearest 0.1 second
function DoStatChanceAnimation(Change, startDelay)
local T = ""
local StartX = 0.0
local StartY = 0.0
local StartZ = 0.0
local DestX = 0.0
local DestY = 0.0
local DestZ = 0.0
local PX = 0.0
local PZ = 0.0
local Delay = 0.0
if Change > 0 then
T = "Textures\\Battle\\StatChange\\statUp"
DestY = 0.8
StartY = -0.45
else
T = "Textures\\Battle\\StatChange\\statDown"
StartY = 0.8
DestY = -0.45
Change = Change - (Change * 2)
end
for i = 0, 40 * Change, 1 do
PX = (math.random() - 0.5) * 1.5
PZ = (math.random() - 0.5) * 1.5
StartX = PX
StartZ = PZ
DestX = PX
DestZ = PZ
Delay = math.random() * 7.0
AttacksSpawnMovingAnimation(StartX,StartY,StartZ,T, 0.1, 0.1, 0.1, DestX, DestY, DestZ, 0.05, false, true, Delay + startDelay, 0.0)
end
end
--check to see if the player is in a text box or pokemon image
function IsWaitingForInput()
if (TextBoxShowing == true) then
return true
end
if (PokemonViewBoxShowing == true) then
return true
end
return false
end
SomeTable = {}
SomeTable["somemethod"] = function(i, j) return i + j end
local i = SomeTable.somemethod(1, 1)
Text("The result is " .. tostring(i))
no idea, i didnt make that.While we are talking about this how do Achievements work currently?
same with the @Achievements command?
'@Achievements:{2}|' works
what is the point of the (optional) string. AFAIK it does nothing...
local drain = math.ceil(Attacks_DamageDealt / 2)
yes, this behaviour existed in the old system too. its something that has to be changed in the engineso the function Attacks_DamageDealt does not take into account doing more damage than the HP that an opponent has.....
and so Leech life dealt a ton of damaga(lvl100 charizard vs lvl 1 chickorita...)
Move animations aren't all finishedQualiava's flame wheel looks like Ember O_0
someone suggested we give moves placeholder animations based on type until they can all be done up. so when i was doing fire i used ember animation for all the damaging moves i scriptedQualiava's flame wheel looks like Ember O_0