Jump to content

Haydenmango

Members
  • Posts

    434
  • Joined

  • Last visited

Posts posted by Haydenmango

  1. Thanks for the responses guys! I don't understand file handling very much so I've been pretty clueless.

     

    @nick.ace - Ahhh this is possibly what Josh was getting at. I was just trying to open the .meta files by clicking on them... lol

    Loading them through code makes a lot of sense and now I know!

     

    @macklebee - That is just what I needed and it works great! Thank you very much for making that. :)

     

    Now I have some code to learn from and instant gratification from macklebees app!

    Thanks again!

    • Upvote 1
  2. Thanks for the reply and that sure looks interesting but I honestly don't know what it means/how I can use it. haha

    Does this mean that the .meta files contain the thumbnail? How would I go about using this?

    • Upvote 1
  3. I found that the Flowgraph was really useful for setting up interactions between entities but it was almost impossible to organize everything after a certain point.

     

    Makes me wonder if Hayden is using the Flowgraph at all.

     

    I used the Flowgraph extensively in a game I made called the Biodome. I haven't used it in any other of my games though.

    It was really useful because I remember I tried dragging and dropping entities into other entities script tabs before hand but once I had over 200 entities to scroll through it started to take a long time. The Flowgraph on the other hand was much more simple in this regard; until I loaded up the Flowgraph editor.

    Here is a video of what my Flowgraph in The Biodome looks like -

     

    It got pretty messy. I have mixed feelings about the Flowgraph editor; it makes script logic quite simple at first but the more you use it the harder it is to use.

    • Upvote 4
  4. Some functions you'll probably use for shooting arrows include - Instance(), SetPosition(), SetRotation(), AddForce(),SetCollisionType(), SetMass()

     

    Shooting arrows works like this in my game, Hunt For Food -

     

    function Script:ShootArrow()
    local arrow=self.arrow:Instance()
    arrow.script.livetime=Time:GetCurrent()+15000
    arrow.script.active=true
    arrow:SetMass(.5)
    arrow:SetPosition(Transform:Point(0,0,.75,player.camera,nil))
    arrow:SetRotation(-player.camRotation.x-90,player.camera:GetRotation(true).y+180,-player.camRotation.z)
    arrow:AddForce(0,1250,0,false)
    end
    

     

    I should also note that my arrows have a script to deal damage on collision. The script looks something like this -

     

    function Script:Collision(entity,position,normal,speed)
    if self.active==true then
    self.active=false
    if entity.script then
    if entity.script.hurtable==true then
     self.entity:SetCollisionType(Collision.None)
     self.entity:SetMass(0)
     self.entity:SetShape(nil)
     self.entity:SetPosition(position)
     self.entity:SetParent(entity)
     if entity.script.health>0 then
     entity.script:Hurt(math.random(5,8.5),player)
     end
     self.livetime=Time:GetCurrent()+3000
    end
    end
    end
    end
    

     

    I hope this helps!

    • Upvote 3
  5. I am getting this message when I try to load a map in Hunt For Food -

     

    Error: Map file version 33 not supported. Update this project in the project manager to get the latest executable, or recompile your game.

     

    My project is up to date and I don't get this error when running my game through the editor.

  6. Hey everyone I have been having trouble finding animal sounds for my game Hunt For Food. I have already looked on freesound.org and haven't found enough.

    If anyone knows a place where I can get some good quality animal sounds let me know it would be much appreciated!

  7. Ever since I opted into the beta build earlier today I have been getting some strange bugs when I initially load up a map in my game. An extra light is being loaded and my character (or maybe my camera) is stuck underground. Once I load another map my game works fine, more details in the video.

     

    I am using the Indie Edition and wasn't getting this error until I opted into the beta earlier today. Let me know if you need my project to look at.

     

    Video Link - https://www.youtube.com/watch?v=fyyQzORQvn0&feature=youtu.be

  8. I use globals and my game works fine. There are some things that globals are actually useful for.

    For example I can make my main player a global labeled player then every time I need to access my main player I can easily use the global.

     

    The only reason I can think of is ambiguity of global and local variables with the same names, but other than that, I can't think of a reason why they are bad.

     

    Yeah this is the main thing you need to look out for when using globals. You probably shouldn't create to many globals because you will have to keep track of them all but using a couple globals isn't a big deal. One other thing I ran into was when changing my map I have to reset most of my global values (especially if the global is equal to an entity) otherwise the global value will point to something that doesn't exist which will crash your game.

×
×
  • Create New...