Jump to content
The Dark Mod Forums

STRUNK

Member
  • Posts

    479
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by STRUNK

  1. I was working on a random self moving thing that can detect boundries and turn away from them. The boundries work with a stim/response where the stim is the boundry and the respons is on a "sensor" in front of the moving func_mover, that is controlled by the script. The sensor has the response to run a function called Warning (when toutching the stim). In my small scale test I got it working flawlessly, but when I scaled it up and put boundries tot the walls of a big room things went totally wrong: big drop in framerate and it didn't work flawless at all ... bummer : D Here is a video of the test setup working at high speed (framerate is down due to OBS running): VIDEO Here is the script, maybe someone can use (parts of) it in the future for something:
  2. @Dragofer That is almost exacly what I tried, but it didn't work ... because of the setSkin I used. But now it works thanx : )
  3. I want to spawn a func_static and a func_mover from script ... is that possible?
  4. Is there something simple I can put in my script, or in my map that is realy eats resourses, so I can test what happens?
  5. @Dragofer If I getFrameTime() it returns 0.0160 so I guess that is the minimum time the engine can repeat/check things. But if I have a wait of 0.001 in a while() loop, it calculates every frame what would have happened in 16 times this while() loop .. right? I have a working script now and am determaning the right settings for maximum speed. Only problem is I can't get higher then a movement of 12 units in one loop, for it results in the enty escaping through the boundries: So I guess getting a higher speed means I have to find out how to get a greater distance in one loop (that always takes 0.0160 sec), without the escape ...
  6. There are different ways to let a script wait, like waitFrame() and wait() Does waitFrame() wait 1/60th of a second when the game runs at 60fps and 1/20th of a second at 20fps? If I use wait(0.01) or wait(0.001), it's a shorter wait period then waitFrame. What is the shortest "safe" wait period, and can a fast computer handle a shorter wait time then a slow computer?
  7. @joebarnin For now it kinda is, but the movement shoud be in 3d finally : ) The script is there now. Had to add comments to it and stuff.
  8. I'm working on a script for a random mover that will stay in an area that is set by boundries. Ok, I erased the question for I have answers t most of it already. New script down here:
  9. @Jedi_Wannabe Thanks! I'm working on the tiny fly now under a microscope : D But it will come together soon.
  10. Imagine a garden with fireflies sitting on stuff, when you come close they fly away into the dark. So I made a big firefly with wings and stuff and made it fly: FireFly Video Next is scaling it all down to fly size.
  11. Scripting the whole bat/moth seemed to be very difficult, so I made a simple script where a bat hunts after an object that moves by binding rotators and doors together: Although it takes some effort to implement in a map, the result is rather nice I think. It could, with some tweaking, also be used for other flying stuff ^^
  12. @AluminumHaste "bats move so fast you wouldn't be able to see any detail anyways". That is true. I made a new bat model, a bit bigger (can be scaled down ofc.), still very simple but without the glitches I got from modeling in DR in the smalest grid. Btw, the bat must be triggered one time before it starts hunting, so it could be lurking somewhere and fly out suddenly in front of you with a trigger multiple or something.
  13. In the following video you see a little white cube that's a func_rotating on the x axis, randomishly triggered by a trigger_timer to invert rotation. Bound to that is the red square plane, that's also a func_rotating, but on the z axis. Bound to that is the little blue cube, that's a sliding door (auto open auto close) named Target. Bat Mechanics The Bat itself is green in the video and is made up of two wing shaped atdm:mover_door's (auto open auto close) bound to a func_mover named Bat (the body of the bat). With 2 little scripts, activated once by atdm:target_callscriptfunction's, the Bat is following and turnig towards the Target: void MoveToTarget() { float min = 10; float max = 20; float rand = min + sys.random(max - min); $Bat.time (rand/30); $Bat.accelTime (0); $Bat.decelTime (0); $Bat.moveTo( $Target ); sys.wait (0.1); sys.trigger($ScriptMove); } void LookAtTarget() { vector direction=$Bat.getOrigin()-$Target.getWorldOrigin(); $Bat.setAngles(sys.VecToAngles(-direction)+'0 0 0'); sys.wait (0.1); sys.trigger($ScriptLook); } If anyone wants a bat flying around in their mission, just pm me for the model and stuff : )
  14. At the workshop I was fiddling around with "stacking" sliding doors on 3 axis and a rotator at the bottom, adding some random triggers and all on different speeds, a semi random movement occurs. The nice thing about this is that you can have your object to go around an object in the middle. https://streamable.com/v5udl9 Now I'm trying to put that into a script and I can get things moving already, but how could the movement be restricted? I think there are ways to detect when an entity touches an other entity, and when that occurs a change of direction can follow, but isn't that processor heavy? Other way could be to predefine the area by creating some sort of (alternative) monsterclip (to define no-go areas). But how to put that in a script?
  15. @demagogue @Geep I was looking at the flies particle effect but I'm thinking about something that could do do moths, bats, fireflies and other things. Some sort of func_mover kind of thing where you can bind a moth/bat/firefly to. Moth/bat could be a looping video on a transparent video screen ...
  16. I'm thinking about bats and moths flying around outside lights. not as a.i. but just a moving object/decoration. Is there already a way to handle 3d randomized movement within boundries?
  17. https://beeldbank.cultureelerfgoed.nl/rce-mediabank/?mode=gallery&view=horizontal&sort=random{1584794652242} asc&page=1&fq[]=search_s_collection:"Bouwkundige tekeningen"&reverse=0&filterAction
  18. @JackFarmer Thank you very much. I am glad to have helped with your great mission Jack : )
  19. Great mission. I love puzzly stuff. Atmosphere is great in all parts, but the Citadel is just amazing : )
  20. Took me 2 hours to complete at expert. Very nice little mission with lots of detail. Really enjoyable : )
  21. @JackFarmer .pfbx is not backwards compatible it seems. Did you try not making a prefab first, or ungrouping the prefab before exporting it as a model? Maybe you can fix the center problem that way ..
×
×
  • Create New...