Jump to content

TheConceptBoy

Members
  • Posts

    159
  • Joined

  • Last visited

Posts posted by TheConceptBoy

  1. Just now, wadaltmon said:

    I don't think that's it. If I set the character model to be taller, remove the outer cylinder, and make it so the held object can collide with Characters, it does the same thing with the character model itself.

    And yes @TheConceptBoy: If we had that in C++ in an extensible form, this would be a non-issue.

    I'm guessing my ball join solution was no bueno right?

     

  2. 9 minutes ago, Lethal Raptor Games said:

    As Josh said in the link, it's the offset from the child entity but it cant be changed once created.  Probably best to use a kinematic joint on a pivot.  Then parent the picked entity to that pivot.  Then set the picked entities global position to that of the pivots + an offset.

    But that's the thing, I don't think the offset works. It always defaults to the center. even if I set the position of the new join to be at the position of the pick.position, it snaps the box by it's center.

     

  3. 1 minute ago, Lethal Raptor Games said:

    https://www.leadwerks.com/community/topic/18966-kinematic-position/?tab=comments#comment-118400

    I think the joint is only a constraint, rather than an entity that can be moved.

    yeah, I'm trying to get the constraint to NOT be in the middle of the object but at the location where the PickInfoData.position reports the collision taken place

  4. Say you've got 5 levels, each level has lots of interact-able objects like switches opening doors, turning on lights, explosions triggered by queues and timers. Enemie spawning on triggers, custom animations and what not. How would you organize the code for each level? Create a custom Actor Class for that one level and when the level starts, spawn that actor to run all that level code?

    • Upvote 1
  5. Good day, everyone. I'm a tad perplexed. I'm attaching a kinematic joing to a model but I don't want the joint to be attached to the smack center of the model because when I use 

     

    SetTargetPosition(pick_sphere->GetPosition(true),1);

    Then the target simply gets moved by it's center. I can kind of get that, since the function says you're moving the target of the joint, it would use the targets center point. The question I have then is, What's the point of setting the position for the joint creation with:

    Joint::Kinematic(pos.x, pos.y, pos.z, entity)

    What is the purpose of it? There isn't a Join->SetPosition so you can't move the joint?

    The point here is to move the target to a position NOT by it's center, but by whatever point you're grabbing  the objects by.

  6. 17 hours ago, Iris3D Games said:

    Where documentation SetResponse??

    Indeed why Isn't it documented? There's a pool of super useful functions floating around in the aether of the leadwerks header files that are essentially lost to new users who rely on the docs. Isn't that the whole point of the documentation? 

    • Like 1
  7. 4 hours ago, Lethal Raptor Games said:

    The best way is to load them outside of the actor class.  Then you attach the actor to each loaded zombie entity.  If you load them in the Attach function you would have to create a separate object (maybe a pivot) and assign the actor class to that pivot so that the actor functions are called.

    Really? I figured the whole deal with using the Actors is that you can just handle all the zombie related stuff IN the actual zombie when it's created... like Load the sounds, load the Model, load the animations, textures, materials and what not - everything related to the zombie. Instead it's like you're but a stone throw away from just doing it with your own class and not using Leadwerks Actor.. The hooks are useful though.

     

    I know that you should probably only load up the zombie 3D model once and instance it to all the actors. You really don't need to have 40 spawned zombies ALL load the model right? You can probably just Load the model once in the engine and then have the various zombies use that one loaded mode. Am I thinking this right?

     

    Say if I load the Model in the main.cpp, can the zombie actor class access the model variables located in the main file? I know I can set the zombie model when I create the zombies in the main.cpp file, but I'd love to be able to just leave ALL zombie related code in the zombie, including the model assignment. 

  8. A little while back, when I was experimenting with UE. I was advised against running IF statement checks on a loop when using blueprints. I'm not sure if that same advise would have applied to C++ but I thought I'd ask. UE promotes trigger based interaction. Instead of a light bulb checking IF a switch is on or off every cycle, the switch instead sends a trigger to the light bulb when the action of switching is performed. I mean there's gotta be an if statement in there somewhere in the switch then, am I wrong?

     

    Would this apply to Leadwerks C++ oriented programming too?

  9. 8 hours ago, Lethal Raptor Games said:

    How I would go about it is load 100 zombies in an Entity* array.  Then assign each entity a ZombieActor class.  Inside your ZombieActor class you make it control each entity.  E.g. In UpdateWorld() you would check the distance to the player, if the payer is close you make it attack.

    Ah, so far the array created with the Entity class method was the correct procedure. So that part lines with with the standard C++ game dev procedure. 

     

    And I take it, then you can address each zombie in that array by using it's id in the entity array slots then?

    • Upvote 2
  10. Now that I've gotten a single instance of the zombie class spawned, which, now that I've gotten a hang of it, was pretty damn straight forward.

    Thank you for the help and patience btw

    1) Creating a proverbial horder of zombie instances would require creating an array based on the actor entity class and storing all the zombies in that array?

  11. Ah, great. So there was literally no way an inexperienced C++ programmer would have ever been able to guess that one. 

    Well at least I know now.

     

    Any ideas if it was VS that caused it? Or perhaps the internet browser is designed to add scramble to potentially harmful files? Notice how the cpp file transfered ok but the .h file had all sort of a mess added to it's suffix?

  12. 3 minutes ago, Lethal Raptor Games said:

    Yeah if they are being referenced by any headers/source files in the Source directory, then they have to be there too.  I just moved all my source and header files to the Solution directory so every time I created a new file through VS I didn't have to manually move it to the Source folder.

    You'd think that if you right click on the Source folder in the Solution explorer and create a class, it would be created in that folder... but noooo

    • Haha 1
  13. I get this array of errors, mainly for the cpp file:

    Quote

    Severity    Code    Description    Project    File    Line    Suppression State
    Error (active)    E0077    this declaration has no storage class or type specifier    LW_EZPZLMSQ    C:\Users\DEVELOPMENT2\Documents\Leadwerks\Projects\LW_EZPZLMSQ\Source\zombie.cpp    15    
    Error (active)    E0065    expected a ';'    LW_EZPZLMSQ    C:\Users\DEVELOPMENT2\Documents\Leadwerks\Projects\LW_EZPZLMSQ\Source\zombie.cpp    17    
    Warning    D9035    option 'Gm' has been deprecated and will be removed in a future release    LW_EZPZLMSQ    C:\Users\DEVELOPMENT2\Documents\Leadwerks\Projects\LW_EZPZLMSQ\Projects\Windows\cl    1    
    Error    C2144    syntax error: 'void' should be preceded by ';'    LW_EZPZLMSQ    c:\users\development2\documents\leadwerks\projects\lw_ezpzlmsq\source\zombie.cpp    16    
    Error    C4430    missing type specifier - int assumed. Note: C++ does not support default-int    LW_EZPZLMSQ    c:\users\development2\documents\leadwerks\projects\lw_ezpzlmsq\source\zombie.cpp    16    
    Error    C2144    syntax error: 'void' should be preceded by ';'    LW_EZPZLMSQ    c:\users\development2\documents\leadwerks\projects\lw_ezpzlmsq\source\zombie.cpp    18    
    Error    C4430    missing type specifier - int assumed. Note: C++ does not support default-int    LW_EZPZLMSQ    c:\users\development2\documents\leadwerks\projects\lw_ezpzlmsq\source\zombie.cpp    18    
    Error    C2086    'int ': redefinition    LW_EZPZLMSQ    c:\users\development2\documents\leadwerks\projects\lw_ezpzlmsq\source\zombie.cpp    18    
    Error    C1004    unexpected end-of-file found    LW_EZPZLMSQ    c:\users\development2\documents\leadwerks\projects\lw_ezpzlmsq\source\zombie.cpp    25    
     

    image.thumb.png.d24d0d132c9f31f338b4ec27bf8d247a.png

×
×
  • Create New...