BillLuvsU Posted September 27, 2010 Share Posted September 27, 2010 Whatup guys. As to the issue of NPC AI, I've been doing alot of thinking about such things lately. My suggestion would be a coordnate based value system, for the actual thinking. Also an "trigger" block system would be very useful, utilizing the hit detecion but not actually drawing the objects. I'll write up some UDF's when I get some time. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
fireryblaze Posted September 28, 2010 Author Share Posted September 28, 2010 (edited) Well there r probably more pople than you realise, only problem is that they still dont post their scripts becose their project still inst ready for posting and there is still lots of things to b tested (that sounded like me ) Back to the topic I never liked to use gravity even on old irr becose of sliding down on low framerate, now i use eather _IrrGetTerrainTileHeight or _IrrGetCollisionPoint depends on situation to get next destination on keyboard press (stick to the ground option). I get current Height position, if $aCollideAt1[1]+25 < $temp + 1.5, and compare it to next destination, and if its FALSCHE that mean (in this case for me) that i can't climb up, That mean that i will not have option to jump, but i think it's better to recreate your option to jump instead to use gravity all the time if you dont need it most of the times. JRowe I wonder if there's way to turn on collision only when you need to jump and to turn it off after? What command did i miss? Congratulations on making such a beatiful scene(Runs and starts coding for beauty...then realises I stink at making things beautiful) Now that you mention that their scripts aren't ready for posting it makes me wonder, was mine? I created this thread so that I could share my learning experience with others and give a rough example of how things can be done for those that might not know where to begin. However it makes me think that maybe I should have done more work with it first. as for adding then removing collision, try _IrrAddCollisionAnimator and to remove _IrrRemoveAnimator Aight actualy tested it now and here is the code that I got. while _IrrKeyEventAvailable() ; read the key event out. $pKeyEvent = _IrrReadKeyEvent() ; arbitrate based on the key that was pressed if __getKeyEvt($pKeyEvent, $EVT_KEY_IKEY) = $KEY_KEY_1 then If $CollisionState = 0 Then $CollisionAnimator = _IrrAddCollisionAnimator( _ $CombinedCollision, $CameraNode, _ 30.0,30.0,30.0, _ 0.0,-3.0,0.0, _ 0.0,50.0,0.0 ) $CollisionState = 1 EndIf EndIf if __getKeyEvt($pKeyEvent, $EVT_KEY_IKEY) = $KEY_KEY_2 then If $CollisionState = 1 Then _IrrRemoveAnimator($CameraNode, $CollisionAnimator) $CollisionState = 0 EndIf EndIf wend Pressing the 1 key turns on the collision and pressing the 2 key shuts it off. Its actualy a very usefull idea, I monitered the FPS doing this and it skyrocketed upwards to 90+ FPS when it was sitting down around 45ish. I will definiteley be adding this to the project ASAP. Edited September 28, 2010 by fireryblaze Link to comment Share on other sites More sharing options...
fireryblaze Posted September 28, 2010 Author Share Posted September 28, 2010 (edited) Version 4.0 is now available. BogQ you should find a good starting point for turning the collision on and off when jumping. However I found a serious glitch the reason of wich I cannot fathom. About 1/2 way up the ladder functions stop working, locking you with the FPS camera + the collision. However jumping back down fixes the bug. Also the animator is only called when the character jumps using space, not when the character just walks off of somthing(Except from the top, but the collision is still in play there) Edited September 28, 2010 by fireryblaze Link to comment Share on other sites More sharing options...
corgano Posted September 28, 2010 Share Posted September 28, 2010 Jumping lacs inertia. any way you could make it so when you jump, you can't change direction midway in the air? Also, making the jump faster and increasing gravity effect would make it more real. 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
fireryblaze Posted September 28, 2010 Author Share Posted September 28, 2010 (edited) @corgano Thanks for your input I will look into making the jump seem more real. @Everyone _IrrGetCollisionGroupFromComplexMesh()instead of using _IrrgetcollisiongroupFromMesh() gives back those 40 or so missing frames when standing still. So basicly that problem is now solved. Edited September 28, 2010 by fireryblaze Link to comment Share on other sites More sharing options...
fireryblaze Posted September 29, 2010 Author Share Posted September 29, 2010 (edited) A quick sneak peek @ what the next update will bring...Yes Zibit this is for you Anyways, yes next up is the old gamers favorite the weapons system. Check back for when it is posted.PS: I know Version 4 kinda sucked...ok Epicly sucked... I jumped the gun because I was getting tired... Anyways I went back to the old system and corrected the problem that was resulting in lost frames. V5 is gonna be good. I promise it will be somthing to look forward to.Also Does anyone know why _IrrGetCollisionPoint doesn't return collisions at longer ranges? Edited September 29, 2010 by fireryblaze Link to comment Share on other sites More sharing options...
kaotkbliss Posted September 29, 2010 Share Posted September 29, 2010 I am so jealous.I'm going to have to stop playing games and start working on mine! 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
fireryblaze Posted September 29, 2010 Author Share Posted September 29, 2010 LOL well it is more fun for me than playing most games. Sometimes it is just fun to tweak out the gravity and run around like a mad man. That is how I actualy started, tweaked example, ohh I think it was 49, so that it had new textures and the little cube was spinning. Link to comment Share on other sites More sharing options...
fireryblaze Posted September 30, 2010 Author Share Posted September 30, 2010 V 5.0 is now up... See OP for more details.Weapon system is now up Partialy anyways. Things that still need added: Recoil, Flash(Waiting untill au3irrlicht2.0.3 V2.0.4), More weapons, and whatever else is recommended/I find time for. Link to comment Share on other sites More sharing options...
Zibit Posted September 30, 2010 Share Posted September 30, 2010 wow that is seriously cool! you rock !!! btw im working on a death simulation function and im making progress ! Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Mat Posted September 30, 2010 Share Posted September 30, 2010 V 5.0 is now up... See OP for more details.Weapon system is now up Partialy anyways.Things that still need added:Recoil, Flash(Waiting untill au3irrlicht2.0.3 V2.0.4), More weapons, and whatever else is recommended/I find time for.Hmmm... I get: AutoIt Project Listing Link to comment Share on other sites More sharing options...
fireryblaze Posted September 30, 2010 Author Share Posted September 30, 2010 hey mat is the background not showing up for you? Maybe try re-downloading it because it works just fine for me. It is either a texture problem OR a problem with 1.irrmesh. Not a whole lot to do about it besides redownloading. Link to comment Share on other sites More sharing options...
linus Posted September 30, 2010 Share Posted September 30, 2010 (edited) Hmmm... I get:Hi Mat, had a same problem with irrmeshes some time ago - so I guess you are running fireryblaze's script NOT from inside a dir "\Irrlicht"? Then, the texture paths inside the .irrmesh will not be found: <texture name="Texture1" value="...\Irrlicht\Meshes\hightechwall06.jpg" />@fireryblaze: Think this is because of paths written relative to IrrEdit. Don't know if this can be changed in IrrEdit, for my problem I simply re-edit the .irrmeshes with paths relative to the script, in this case ".\Meshes\hightechwall06.jpg" Edited September 30, 2010 by linus Link to comment Share on other sites More sharing options...
Mat Posted September 30, 2010 Share Posted September 30, 2010 Hi Mat, had a same problem with irrmeshes some time ago - so I guess you are running fireryblaze's script NOT from inside a dir "\Irrlicht"? Then, the texture paths inside the .irrmesh will not be found: <texture name="Texture1" value="...\Irrlicht\Meshes\hightechwall06.jpg" />@fireryblaze: Think this is because of paths written relative to IrrEdit. Don't know if this can be changed in IrrEdit, for my problem I simply re-edit the .irrmeshes with paths relative to the script, in this case ".\Meshes\hightechwall06.jpg"It's running from:"C:\Downloads\Irrlicht 5.0\Irrlicht\Warehouse Script.exe"exactly where I extracted it, so it should work. I have full rights in that directory blah blah blah... It's weird. All other versions work as intended, it's only the latest one that is causing the problems. AutoIt Project Listing Link to comment Share on other sites More sharing options...
linus Posted September 30, 2010 Share Posted September 30, 2010 "C:\Downloads\Irrlicht 5.0\Irrlicht\Warehouse Script.exe"Looks ok, but still think textures are at wrong place. What does the console say when you run the warehouse.au3 - it should sayResizing window (800 600)Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall06.jpgLoaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall03.jpgLoaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor01.jpgLoaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor02.jpgLoaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall02.jpgLoaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall01.jpgLoaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall05.jpgLoaded mesh: Meshes\1.irrmeshIf not "Loaded", then textures are at wrong place. If "Loaded", it's something different. Link to comment Share on other sites More sharing options...
fireryblaze Posted September 30, 2010 Author Share Posted September 30, 2010 (edited) It very well could be the dir I tried cleaning it up a bit, guess that kinda fluffed it... Thanks for the input linus I will update it later tonight using a more umm "Relative" Path. The odd thing is the gun loads/ zumlin loads/ even the crosshair loads. Did you try redownloading it? Also is anyone else having this problem? Edited September 30, 2010 by fireryblaze Link to comment Share on other sites More sharing options...
Mat Posted September 30, 2010 Share Posted September 30, 2010 Looks ok, but still think textures are at wrong place. What does the console say when you run the warehouse.au3 - it should say Resizing window (800 600) Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall06.jpg Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall03.jpg Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor01.jpg Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor02.jpg Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall02.jpg Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall01.jpg Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall05.jpg Loaded mesh: Meshes\1.irrmesh If not "Loaded", then textures are at wrong place. If "Loaded", it's something different. expandcollapse popupIrrlicht Engine version 1.7.1 Microsoft Windows Vista Personal Service Pack 2 (Build 6002) Using renderer: OpenGL 1.4.0 Intel 945G: Intel OpenGL driver version is 1.2 or better. GLSL not available. Resizing window (800 600) Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall03.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor02.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall02.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor02.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall03.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall03.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall02.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg Ahh... That would be the problem. I think that the 3 dots should be 1. I will see. AutoIt Project Listing Link to comment Share on other sites More sharing options...
fireryblaze Posted September 30, 2010 Author Share Posted September 30, 2010 Ok V5.1 is up with corrected directories. They look like <texture name="Texture1" value=".\Meshes\hightechwall06.jpg" /> Hope this fixes the problem Link to comment Share on other sites More sharing options...
Mat Posted September 30, 2010 Share Posted September 30, 2010 Ok V5.1 is up with corrected directories.They look like<texture name="Texture1" value=".\Meshes\hightechwall06.jpg" />Hope this fixes the problemFixed What about object collision with the monster? And when I release the mouse he stops being blown away instantly, which isn't nice... But apart from that... Fantastic AutoIt Project Listing Link to comment Share on other sites More sharing options...
fireryblaze Posted October 1, 2010 Author Share Posted October 1, 2010 OK well there is a bit more that must be done for making it finish the animation cycle, however adding in collision with the monster is going to be taking place when I make the monster move/Add new monsters. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now