Jump to content

ParaToxic

Members
  • Posts

    425
  • Joined

  • Last visited

Everything 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
  2. Okey I got it You have to use boost::ref for that.Here a little example: #include <boost\ref.h> #include <map> std::map<boost::reference_wrapper<int>,int> m; int a; int& b = a; m.insert(std::make_pair(boost::ref(B),a)); // Set b as a reference to the map
  3. 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
  4. @Roland: Thats exactly the API i'm using for that. Well I've got it work yesterday.Very cool stuff, you can debug your app from Visual studio on your phone.
  5. Okey I got it Well the build fails but I got it ..
  6. So this kind of variable isn't only for Visual Studio ? When I set it with cmd it show me the same error in Visual Studio. I haven't got the menu !Tools" , just have the express version
  7. 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
  8. You should use the alphablend or alphatest shader for example mesh_diffuse_aplhablend.frag ...
  9. Okey I got it !! The count of the children goes from 1 to CountChildren() + 1 , so I missed the last child ....
  10. 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
  11. 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
  12. 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 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.
  13. Just use a hacking tool to hack into joshs PC.....but nobody will do that nobody
  14. I think that is the answer to the question Thanks
  15. 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 Maybe somebody can help me with that, Thanks
  16. Yes you are right, haven't thought about that :
  17. @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 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.
  18. Hmm when I only create a cube it works fine but when I load a scene it crashs...
  19. Hmm i can't get it work.I think I have the save code . ->
  20. Why you clear all , call scene.loadmap and then Fall reinitialize() ?
  21. But when I call fw = createframework and Athen create a cube i become not hing, just 2 flipping images of the old renders but no cube
  22. But you only create a New framework ? Iam not sure if that works in runtime
  23. Hey like the title says , I want to delete all entites Form the frameworks mainworld.But I can't get it work with resetframework Ort free and create a New framework.Please help
  24. How do you want to add more than 1 material to a character which only needs 1 material ?? When you exported your character with more than 1 material, you don't have to paint the mesh via script, only create material files with the name your materials had in the modelling programm ( or use converters like UU3D for automatic..)
×
×
  • Create New...