Jump to content

ParaToxic

Members
  • Posts

    425
  • Joined

  • Last visited

Posts posted by ParaToxic

  1. Yes , I have some interfaces: Each Actor has a IActorInterface which contains some variables like m_move,m_strafe.... Then I have with polymorhpism two other classes : IHumanInterface and IAIInterface. So you can create a user (human) interface with the type IActorInterface and pass it or an AI interface. Well the human interface has a functions that loads keybinds from a ini file.

     

    So I pass in my m_move as a reference in the map and the key which affects that value.Then in a Updatefunction I have a for loop which goes through all members in the map and check with if(KeyDown(itr->second)) if the key is pressed and when it is the first value ( with is a reference to my other variable ) should get an other value.

    Thats the idea behind it :D

  2. Hello guys, I have a little problem here.I'm making a keybinding system for my game and need a map with a int reference as the first key and a normal int as the second.

    Well that's not supported by the standart STL map.

    Then I saw in the boost lib the wrapper for references. Now my map looks like that:

    [/size]
    std::map<boost::reference_wrapper<int>,int> m_keybinds;
    

     

    But now I don't realy know how to insert items in the map, because

    [/size]
    m_keybinds.insert(std::make_pair<boost::reference_wrapper<int>,int>(var,key))
    

     

    don't work.

     

    Maybe somebody has experience with that wrapper :D

  3. Hey guys I have a big problem here.I want to build Android apk files with the vs-android framework and the Android SDK/NDK.

    So now in the sample project I have to set the variable $(AndroidNdkDir) to a value , but it's now set to <unset> .

     

    Well I can see it when I opne the project properties and go to Debugging -> Remote Command Arguments -> (Dropdown ) Change -> Makros>> and there is a table with that stuff but I can't change it...

     

    Well I'm searching for 1,5 hours now and can't find hot to do that. On some sites there are some commands like setx AndroidNdkDir "C:...." .... but where ?

     

    Thanks

  4. My script:

    [/size]
    require("scripts/class")
    local class=CreateClass(...)
    function class:InitDialog(propertygrid)
    self.super:InitDialog(propertygrid)
    local group=propertygrid:AddGroup("GameObject")
    group:AddProperty("Actortype",PROPERTY_CHOICE,"Player,NPC0")
    end
    function class:CreateObject(model)
        local object=self.super:CreateObject(model)
    
    
    end
    

  5. Hey ya, I made a new entity with a script with the name gameobject_actor.Then I added a property with the name "actortype" with a dropdown box "player,npc0"

     

    So I placed one actor in the scene and gave him "player" as actortype.

    Then I saved it and saw the following code in the scene file;

    [/size]
    Model {
    path="gameobject_actor.gmf"
    position=-2.88000011,1.30999994,-6.30000019
    rotation=-0.000000000,0.000000000,0.000000000
    scale=1.00000000,1.00000000,1.00000000
    id=236444968
    "actortype"="0"
    "class"="Model"
    "intensity"="1.0"
    "name"="player_spawn0"
    }
    

     

    But now when I go through the scene entity ( for( int i = 1; i < CountChildren(entity); i++)) and get with GetChild(entity,i) each child of the scene. Then I get the Key from each entity with: GetEntityKey(GetChild(entity,i),"actortype")) and print that out in a console.

    But I don't get a result, no values with the key "actortype" ....

     

    Well I don't realy know what to do now....maybe somebody has an idea.

    Thanks

  6. Thanks for the answers.The stuff with the entity key was also a first idea , but I wasn't sure if the program doesn't crash when I check a entity for a non existent key...Well now I have it :D Thanks

     

    I hope he LE3 Framework has this kind of pattern system, because I would like to make advanced functions and stuff like own shader frameworks ... etc. isn't "possible" ( I mean without hooks ) with the current framework.

  7. Hey ya I would like to make a processscene function that goes through the scene and give me all entitys that have the same mesh filename .

    That is for my ActorSystem.I would like to have some dummy objects in my scene, which represents the spawn points of the different actors and in my code I would like to create for each actor in the scene a Actor instance with some keys .... but I need something else as the name ( which you can get with the FindChild function ).

    I thought ybout the javascriptfunction getElementsById :D

     

    Maybe somebody can help me with that,

    Thanks

  8. @Rick: Thats a good idea for that.But how can I find out that I'm running it in the editor ?

    I saw that LE3 comes with a collisiontrigger script, so I will wait for that :D

    Also it should save the properties as keys ( I mean the scale ) and load it from keys when exist, because now when I load a scene I have to resize all the collisionboxes again.

×
×
  • Create New...