need help with scripts please

  • Master__Slayer
    24th February Member 0 Permalink

    I'm trying to run a script but I know nothing about it and i have done some of the things that ive seen in the forum and it isn't helping I'm trying to get a clone or BCLN that summons lightning like the ones in lightning bombs (looks like all direction rays of white light .) and i want it to have a short life. I had chat gpt do something for me and it gave me this

    local frames = 0 local duration = 5 * 60 -- 5 seconds at 60 frames per second -- Main simulation loop function update() frames = frames + 1 -- Check if the duration has been reached if frames > duration then return end -- Spawn LIGH (lightning) in all directions for angle = 0, 360, 10 do local radianAngle = math.rad(angle) local xVelocity = math.cos(radianAngle) local yVelocity = math.sin(radianAngle) add_particle( x + xVelocity * 5, -- Adjust the multiplier for distance y + yVelocity * 5, -- Adjust the multiplier for distance element.LIGH, 0, 0, 5 -- Adjust the value for the initial temperature if needed ) end end

    ) it was not very help full but got the code if any one can help me please do

     
     
  • SamDwich
    25th February Member 0 Permalink

    i wouldnt really trust chatgpt (it doesnt even know what the actual scripting language for tpt is)

    literally just learn lua and maybe look at the bcln source code to see how that works

  • Master__Slayer
    26th February Member 0 Permalink

    @SamDwich (View Post)

     ok thank u