This is where active bugs can be seen and where to post a new bug.

Script stopped working.. [active]

Script stopped working.. [active]

Postby epsilonion » 18 Dec 2016, 18:55

Hi
My script stopped working after the update.

Code: Select all
obj = 0;
spawnID = 0;                                 -- Set Exist to 0 to spawn 1st barrel

function onInit(objID)
   sky.lprint("LUA: Script Active!");
   obj = objID;
   x,y,z = entity.getWorldPosition( obj );            --Get the world position of the barrel spawn point
end

function onUpdate(timeDelta)

   if( entity.exist(spawnID) == 0 ) then             -- check that barrel doesnt exist
      spawnID = entity.spawnPreset("Barrel05",x,y,z);      -- Spawn the preset barrel05 @ world position of spawn point
      entity.setTag(spawnID,"barrel01");               -- Set the Tag so barrel can be refrenced in other script.
   end

end


The entity.setTag(spawnID,"barrel01"); command seems to have stopped assigning tags to spawned in presets.


The death trigger also has started to give errors again.

Code: Select all
obj = 0;
x,y,z =0;
function onInit(objID)
   sky.lprint("LUA: Script Active!");
   obj = objID;
   playerID = entity.getIDFromTag("player");
   x,y,z = entity.getPosition(entity.getIDFromTag("spawnpoint"));
   y=y+2;
end

-- Updated every frame
function onUpdate(timeDelta)
   
end


function onTrigger_Enter(hitID)
   entname = entity.getTagFromID(hitID)                         --Get the TAG from the ID of the entity that collided with the trigger box
   if(entname == "Player")then                             -- the name of the player entity
      sky.lprint("Player Detected...");                   --Left for debugging
      character.setPosition(hitID,x,y,z);
   end
   
   if(entname == ("barrel01"))then                             -- the name of the player entity
      entity.delete( entity.getIDFromTag("barrel01") );
   end
   
   if(entname == ("barrel02"))then                             -- the name of the player entity
      entity.delete( entity.getIDFromTag("barrel02") );
   end

end


The error in the console
Code: Select all
LUA ERROR: Tag name [ barrel01 ] not found or it is invalid, have you used the correct tag name? Does the tagged object exist?
LUA WARNING:** DELETE OBJECT ** Attempt failed!
You can not delete an entity that was placed in the scene at edit time.
Only spawned entities can be deleted dynamically.
LUA ERROR: Tag name [ barrel02 ] not found or it is invalid, have you used the correct tag name? Does the tagged object exist?
LUA WARNING:** DELETE OBJECT ** Attempt failed!
You can not delete an entity that was placed in the scene at edit time.
Only spawned entities can be deleted dynamically.
|    < Skyline Game Is Stopping! >    |


The thing is that the entities that are been deleted are spawned in from the 1st script and the above error is generated when trying to delete them through a script attached to a trigger.
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Script stopped working..

Postby SolarPortal » 18 Dec 2016, 19:06

Thanks, will check this out when i get a chance :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Script stopped working..

Postby epsilonion » 18 Dec 2016, 19:12

Another one on this level is that when you "run in editor" you can run using the shift key but run in standalone and the shift key does not seem to want to make me run lol.. :)
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Script stopped working..

Postby epsilonion » 18 Dec 2016, 19:42

In that same scene the death triggers (1 and 2), they dont seem to be working properly.

Lets try and describe whats going on.
Death 1 is supposed to spawn you at the beginning and death 2 in front of the ladder.

Visually they are separate but if you hit death trigger 1 after the door it moves the player to in front of the ladder even though visually when in the editor it should put you back at the beginning.
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Script stopped working..

Postby SolarPortal » 18 Dec 2016, 19:47

when i tried it, i also noticed that i went to the stairs before i got there.
We'll get this fixed in time :D
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Active / New Bugs

Who is online

Users browsing this forum: No registered users and 10 guests