Jump to content

Arska134

Members
  • Posts

    119
  • Joined

  • Last visited

Posts posted by Arska134

  1. Still not working. Now bulletholes can't be seen even in close range. Now it's grey when close to "bullethole".

     

    Edit:

    I made little bit changes to .mat file and now i got this.

    bullethole.png

     

    When i shot to wall it makes bullethole where i hit, but paints entire surface. (black from far, blue from near) When second bullet hits wall. It makes the same, but i think it paints over the earlier bullethole.

     

    mat file looks like this:

    texture0="abstract::bullethole.dds"
    zsort=1
    overlay=1
    clamp0=1,1,0
    clamp1=1,1,0
    

  2. Still not working that way.

     

    When i look painted wall closely i see this:

    bulletholes.png

     

    Looks like it's painting entire surface with bulletholes. Closely there is bulletholes, little bit further wall is blue. And far, wall is black.

    Help is appreciated.

  3. Okay... Bumping this topic up...

     

    Looks like planes are not good for this, so i am still struggling with this thing. I tried it again with decals with this code:

    am.bullethole = 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::bullethole.mat"),1)
    AddMesh(am.bullethole, TMesh(spick.entity))
    

     

    And what happens is this:

    lolmo.png

     

     

    So... It paints the surface black. Not what i am trying to do. Ideas?

  4. Okay... So i got bulletholes working with 'planes'. Only problem is that bullethole materials behave strangely. From far bulletholes is blue, little bit closer, bullethole texture is stretched oddly. Near bullethole material is right, but no masking.

    Is it even possible to make round bulletholes with planes?

     

    Here is my bullethole solution:

    am.bullethole = Createplane()
    Scaleentity(am.bullethole, Vec3(.0625,.0625,.0625))
    PaintEntity(am.bullethole, LoadMaterial("abstract::bullethole.mat"), 1)
    entityParent(am.bullethole, spick.entity)
    Positionentity(am.bullethole, spick.position, 1)
    AlignToVector(am.bullethole, spick.normal,2,1)
    EntityViewRange( am.bullethole, VIEWRANGE_NEAR)
    am.timer = MilliSecs()
    

  5. Not directly with LE2. It requires a graphics window. The new Leadwerks will do this I believe. Others have worked around this though, but I'm sure it's not so straight forward as you'd hope. Mumbles I think did something where she worked directly with the physics library for a server app.

    ah.. okay. Maybe i drop off dedicated server from my project. Got some more problems with it so maybe it's just better to let it go. :P
  6. Almost working now.

     

    If KeyHit(KEY_ESCAPE)=True Then
     freeentity(playerModel)
     freeentity(player)
     resetframework()
     Goto menu
    EndIf
    

    Thats what i did when escape is pressed.

     

    Now it goes to menu. (what is oddly very blurry) When i go back to game it loads everything nicely. Next thing what i see my player character falling, because scene isn't loaded.

     

    So can somebody explain me why it's not loading scene?

  7. Here is some "code" to explain what is happening.

     

    *Load everything which i need only load ones (engine and etc...)*
    #menu
    *Load scene for main menu*
    repeat
    *menu selection stuff*
    forever
    
    *Load scene for game itself*
    *Create player controller*
    *Create player model*
    repeat
    if keyhit(KEY_ESCAPE) then
    goto menu
    endif
    forever
    

     

    So if i press 'escape' it jumps back to menu scene loading part. What should i do before jumping there? I no need game scene no more when going back to main menu. I need to reset/delete it somehow. Now when i am going back to game it continues previous scene of game, but not creating new character model, and old one is still in scene where i left it last time.

  8. Like this?

    addMesh(am.bullethole, TMesh(spick.entity))
    

    (No bulletholes, but no errors when compiling)

     

    And another question is how do i check if picked entity is suitable for decals to it's surface? Because now it's crashing when "shooting" to ground.

×
×
  • Create New...