Jump to content

tipforeveryone

Members
  • Content Count

    374
  • Joined

  • Last visited

Community Reputation

255 Excellent

4 Followers

About tipforeveryone

  • Rank
    Advanced Member
  • Birthday 04/11/1989

Profile Information

  • Gender
    Male
  • Location
    Hanoi, Vietnam
  • Interests
    3D Game making, Drawing, Playing games

Recent Profile Visitors

8,779 profile views

Single Status Update

See all updates by tipforeveryone

  1. Today I learnt that Map:Load working only with Script:UpdateWorld. If I use Script:UpdatePhysics instead, game will crash with "assert error"

    1. JMK

      JMK

      I cannot imagine the ramifications of doing either in one of those update hooks. 😳

    2. tipforeveryone

      tipforeveryone

      I use UpdatePhysics() to update opacity of texture which I draw on screen (my logo splash).
      I put this into it, then get "assert error"

      function Script:UpdatePhysics()
        if texture.opacity == 0 then
          world:Clear()
          Map:Load(mapPath)
        end
      end

      I try this with UpdateWorld() then it works

      Script.changeMap = false
      
      function Script:UpdatePhysics()
        if texture.opacity == 0 then
      	self.changeMap = true
        end
      end
      
      function Script:UpdateWorld()
        if self.changeMap then
          world:Clear()
          Map:Load(mapPath)
        end
      end

       

    3. Show next comments  3 more
×
×
  • Create New...