Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Akamatsu

#1
@Christopho

I've got a compiled version and have not had this issue how long does it have to be running?
#2
Add me on discord Akamatsu#5130 shouldn't be to hard to figure out how i've got some stuff I'd like to share with you in private and get your thoughts or opinions.

I also was able to get a script to work that we talked about but it's sort of limited for now I can explain more in detail on their.
#3
@Max Sorry about this being a bit off topic and all but is their a way I can contact you to share some stuff with you?
I sent you that message forever ago the one you replied to I've got some stuff to discuss with you in private  ;D

do you have steam/Discord?

#4
I've always done projects by myself for the most part I just spend 1-2 years working on it.

there is only 1 game I have worked on with a team and that's SCP containment Breach

I normally pick things up pretty fast so I'm not to worried but if somebody has the free time to help I will not complain.
#5
That's a good idea never thought about that.
#6
Also I'm always looking for help with my project if anyone is interested it's quite a large scale for one person i'll be showing off screenshots and such at a later point once I feel things are up to my standards I could always use another person on the project no matter what you can do.

I'll be sure to give a special thank you to Diarandor and Max
#7
Code (lua) Select

local enemy = ...
local game = enemy:get_game()
local map = enemy:get_map()
local hero = map:get_hero()
local sprite = enemy:create_sprite("enemies/Redead2")
local movement
local IsPlayerFrozen = false


function enemy:on_created()

movement = sol.movement.create("target")

  enemy:set_life(8)

  enemy:set_damage(10)

end





function enemy:on_restarted()

sol.timer.start(self, 3000, function() sol.audio.play_sound("Redead/RedeadMoan") end)

self:get_sprite():set_animation("immobilized")

enemy:check_hero()

end



function enemy:check_hero()

   if self:get_distance(hero) <= 80 then

   movement = sol.movement.create("target")

   self:get_sprite():set_animation("walking")

   movement:set_speed(28)

   movement:start(enemy)

end
sol.timer.start(self, 1000, function() self:check_hero() end)

if self:get_distance(hero) <= 80 then

if IsPlayerFrozen == false then

   sol.timer.start(self, 3000, function() hero:freeze() end)

   IsPlayerFrozen = true

end

end

if self:get_distance(hero) <= 80 then

if IsPlayerFrozen == true then

   sol.timer.start(self, 5000, function() hero:unfreeze() end)

    IsPlayerFrozen = false
end
end
end








function enemy:on_dying()

sol.audio.play_sound("Redead/RedeadDie")

end
#8
it was already fixed before I tried to change it  :D I just changed it back although I kind of have a rough idea of what was wrong with it.

so enemies do not play walking left and right animations by default?
#9
Not, sure what their is to explain?

if I use the else feature instead of making another if statement it no longer loops like it does before I changed it.

Basically the hero no longer gets unfrozen and frozen more then once.
#10
can you explain a bit more for some reason if I make it else the code doesn't work anymore it just runs it once instead of looping it for some reason.
#11
I've been doing that since I started.
I'm going to put my redead code here just in case somebody is looking for one and since you guys helped me it's only fair

I cleaned it up last night and made it look nicer your welcome to look over it and point anything out that may have been done wrong or could have been done better but it works like it should doesn't mean it couldn't be improved.

Code (lua) Select

local enemy = ...
local game = enemy:get_game()
local map = enemy:get_map()
local hero = map:get_hero()
local sprite = enemy:create_sprite("enemies/Redead2")
local movement
local IsPlayerFrozen = false


function enemy:on_created()
movement = sol.movement.create("target")
  enemy:set_life(8)
  enemy:set_damage(10)
end





function enemy:on_restarted()
  sol.timer.start(self, 3000, function() sol.audio.play_sound("Redead/RedeadMoan") end)
  self:get_sprite():set_animation("immobilized")
  enemy:check_hero()
if self:get_distance(hero) <= 80 then
if IsPlayerFrozen == false then
  sol.timer.start(self, 3000, function() hero:freeze() end)
  IsPlayerFrozen = true
  sol.audio.play_sound("Redead/RedeadScream")
end
end
  if self:get_distance(hero) <= 80 then
  if IsPlayerFrozen == true then
  sol.timer.start(self, 5000, function() hero:unfreeze() end)
  IsPlayerFrozen = false
end
end
end



function enemy:check_hero()
  if self:get_distance(hero) <= 80 then
  movement = sol.movement.create("target")
  self:get_sprite():set_animation("walking")
  movement:set_speed(28)
  movement:start(enemy)
end
sol.timer.start(self, 1000, function() self:check_hero() end)
end








function enemy:on_dying()
sol.audio.play_sound("Redead/RedeadDie")
end

#12
Yes, that's exactly what I did
#13
ah I figured out why it was giving errors I kind of feel dumb now I was putting code like this

Code (lua) Select
if game:get_value("Sleeping") == 2
then movement:set_target(hero)
then movement:set_target(hero)
then movement:set_target(hero)
end


I actually had no idea how to use the local function this is basically the same thing as a reference from elder scrolls engine's I was wondering if their was a way to use this type of feature but I just didn't understand how to declare it this helps me out VERY much seriously thanks for explaining this will make things much smoother  :D
#14
Okay,

Thank you so much for your help the reason I wrote

Code (lua) Select
if game:get_value("Sleeping") == 2

for each one is because for whatever reason it was giving me errors if I tried to group them under one .

no clue why it did this for me maybe I just did it wrong not 100% sure

either way thanks for the tips I learned coding on other engines but I have not really messed with lua before so it's still kind of new to me.
#15

Here is the code.





local enemy = ...
local game = enemy:get_game()
local map = enemy:get_map()
local hero = map:get_hero()
local sprite
local movement
local sprite = enemy:create_sprite("enemies/" .. enemy:get_breed())

-- Event called when the enemy is initialized.
function enemy:on_created()
if game:get_value("Sleeping") == nil
then game:set_value("Sleeping",1)
end

  enemy:set_life(25)
  enemy:set_damage(12)
enemy:get_damage()
self:set_pushed_back_when_hurt(false)
end

function enemy:get_damage()
enemy:set_hurt_style("monster")
self:set_animation("sleeping")
end


function enemy:on_hurt()
if game:get_value("Sleeping") == 1
then game:set_value("Sleeping",2)
end
sol.audio.play_sound("IronKnuckle/Iron_KnuckleHit")
sol.audio.play_music("MiniBossTheme")
end

function enemy:on_dead()
enemy:create_enemy{
name = "UnarmoredIronKnuckle",
      breed = "IronKnuckle Early Unarmored",
}
sol.audio.play_sound("IronKnuckle/Iron_KnuckleLoseArmor")
end

function enemy:on_restarted()
if game:get_value("Sleeping") == 2
then movement = sol.movement.create("target")
end
if game:get_value("Sleeping") == 2
then movement:set_target(hero)
end
if game:get_value("Sleeping") == 2
then movement:set_speed(15)
end
if game:get_value("Sleeping") == 2
then movement:start(enemy)
end
if game:get_value("Sleeping") == 2
then sprite:set_animation("walking")
end
end