Jump to content

Arska134

Members
  • Posts

    119
  • Joined

  • Last visited

Posts posted by Arska134

  1. So i am trying to make some bulletholes. I made it just like in Leadwerks documents, but i got "Compile error Unable to convert from 'TEntity' to 'TMesh'.

    am.bullethole:TMesh = CreateDecal(spick.surface, TFormPoint(Vec3(spick.X, spick.Y, spick.Z), Null, spick.entity), 20.0/16.0, 32)
    EntityParent(am.bullethole , spick.entity, 0)
    PaintEntity(am.bullethole , LoadMaterial("abstract::fire.mat"))
    addMesh(am.bullethole, spick.entity)
    updatemesh(am.bullethole)
    

     

    Error is pointing me to AddMesh line and i understand error, but without addmesh there is no bulletholes.

     

    I followed this document:

    http://www.leadwerks...tle=CreateDecal

  2. Looks like that it's creating new controller, but it isn't creating player model again. I tried to use "FreeEntity(playerModel)", but it still not creating new one when entering game again.

     

    I pushen some barrels around in my scene and then tried to go back to main menu and then start new game, but barrels are in place where is pushed them. I am not currently using clearworld() because it crashes the game. If i understand right you said in that thread that when loading new scene it should reset framework too.

  3. My old project works well with these lines:

    Global fwMenu:TFramework = CreateFramework()
    If Not fwMenu RuntimeError "Failed to initialize engine."
    SetScriptObject("fwmenu", fwmenu)
    

     

    My current project gives me:

    Compile Error
    Identifier 'SetScriptObject' not found
    

     

    Somebody knows why?

     

    EDIT: Okay this problem is solved. Forgot that function...

  4. Hello!

     

    I am trying to do menu and game in different scenes, but some problems comes up...

    For a first boot of game menu loads as it should. I select "Start game" and game itself loads as i should.

    But when i press ESC (to go back to main menu) it gives me "Null framewerk". I tried to clear all entities from world with "ClearWorld()" function.

     

    If KeyHit(KEY_ESCAPE)=True Then
    clearworld()
    Goto menu
    EndIf
    

     

    Game keeps running still. blink.png

     

    Now i try to select "Start game" and game crashes.

     

    Without clearworld() it gets back to game, but player model is invisible and old player model stands there.

     

    So how should i reset my game probably?

  5. I would check it in the Leadwerks Model Viewer as well, just in case. If that's fine too then I think it's safe to guess that it's likely your code. Maybe your animation range is off? Also, are you animating upper and lower body separately?

    All frames works just fine expect walking animation. I am not animating them separately.

     

    I had the same problem ,some animations of FPScreator works fine in a modeling program ,but when you convert it into gmf. you have some lags.

    I heard that you can solve this problem with Ultimate Unwrap 3D ,because it exports directly in gmf

    This is FPScreator model i think, and it's converted via UU3D

  6. Are you still parenting? Parenting can lead to some funky stuff sometimes. Worth a shot to unparent if you are still doing it. Other things like mass maybe? Been awhile since I used controllers so can't remember off the top of my head.

    I am not parenting them anymore.
  7. Try a lower value like 100. The speed of 2.5 can also be changed possibly to a lower number.I just played around with these values till I got a good result. Didn't really know what I was doing. But it works fine.

    Even with maxacceleration of 1, it still flys sky high. :D
  8. pointEntity(zombie,playerl,3,1,0)

    UpdateController(zombie.control,zombie.rotation.y,2.5, 0, 500,1,0)

    Hmm... when i use maxacceleration 500 zombie launches to another planet straight away. O_O

     

    Without that, zombie changes direction pretty slowly. :/

  9. Hello!

     

    I need to ask you guys how i can point my controller to facing another. I made zombies in my game with controllers. Is it even good idea? I came up with idea of using controllers, because it's easy to determine if zombie is falling or crouching. But now i have some problems when i am trying to make zombies follow player model.

     

    I'll stick with controllers, or something else?

     

    Thanks.

  10. I'll start to debuggin as soon as possible when i have time. If i get solution for this, i will post it.

     

    If someone solves this problem before me, let me know solution. That would save me lot of time.

     

     

    Edit:

    It's now fixed. Huge thanks for Daimour.

     

    And there is my another question in first post too. To simplify question: How can i output time of the day from script

  11. Thanks Daimour's help i get some more information about this problem.

     

    So problem can be server side too. Here is Dedicated server code:

    http://paste.servut.us/plain/gu4s

     

     

    Here is some server log:

    
    Player Arska134(0) has joined the game!
    Players on server: 1
    Player test(1) has joined the game!
    Players on server: 2
    Player test(0) has disconnected!
    Players on server: 1
    Player test2(2) has joined the game!
    Players on server: 2
    Player Arska134(0) has disconnected!
    Players on server: 1
    Player test2(0) has disconnected!
    Players on server: 0
    
    

     

    As you can see between brackets is player ID and that is different when disconnecting.

  12. I think i know what is wrong, but i can't come up with any solution to fix it.

     

    So now program knows who is local object and who is remote, but when there is 2 remote objects it thinks those are same... I really really appreciate any help you can give me. I am so out of ideas in this one. :/

     

    I don't even know is the problem in my dedicated server or client side.

  13. This is not quite Leadwerks question, but i hope there is some clever people who can give me some tips to get my code working right. I asked this already in Blitzmax forum, but i can't get answer so i'll try my luck here.

     

    So problem is that code works as expected with 2 players, but when third one joins in... Models starts to flickering, because models position changes constantly.

     

    Here is multiplayer part of my code:

    http://pastebin.com/raw.php?i=TSrmvMSF

     

    Here is network variable info:

    remoteobj 0 = PlayerID (player's unique ID)
    remoteobj 1 = Nickname (player's nickname)
    
    remoteobj 2 = X (player's X coord) 
    remoteobj 3 = Y (player's Y coord)
    remoteobj 4 = Z (player's Z coord)
    
    remoteobj 5 = RX (player's pitch)
    remoteobj 6 = RY (player's roll)
    remoteobj 7 = RZ (player's yaw)
    
    
    remoteobj 8 = health (player's health)
    remoteobj 9 = cash (player's cash)
    
    remoteobj 10 = flashlight (player's flaslight status)
    
    remoteobj 11 = connected (player's connection status)

     

    I'll ask another question too. I need to sync daytime with all players. I'am using this script:

    http://www.leadwerks...y-night-script/

     

     

    I really appreciate your help. My project is kinda frozen, because of these problems.

  14. Little bit confused with LUA...

    SetEntityKey( TEntity entity, str keyname, str keyvalue )

     

    So what is "self" entity in LUA script for "TEntity entity".

     

    Need to have something like this:

    SetEntityKey( self entity, "food", "bread" )

  15. Better in Windows 8 is that boot time is shorter and hotkeys is better.

     

    Also Microsoft integrated Security Essentials in Windows 8, so no need to get antivirus. I think that other antivirus software companys doesn't appreciate that very much.

×
×
  • Create New...