Jump to content
The Dark Mod Forums

STRUNK

Member
  • Posts

    479
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by STRUNK

  1. @Dragofer I tried different strings also, but it just doesn't seem to work. sys.trigger($Sound) should do the same, but I didn't think of that yet. This mornig I decided to do the very short tutorial https://wiki.thedarkmod.com/index.php?title=A_Beginner's_Guide_to_Scripting That's where I seen this: // JoeBloggs: this script triggers a door to open and close in a test map void FrobDoor() { sys.print("\n\nYour script is running"); $TestDoor.activate($player1); } And I had downloaded the files from the cutscene tutorial : https://wiki.thedarkmod.com/index.php?title=Cutscenes_Part_1:_Cameras Playing around a bit with lights, and later motion I learned a lot today. Looking throug all the Script events there is so much that can be scripted : O One thing is that if you make something work with triggers ans s/r, you can copy all that you need for the "mechanism" and all will work, but with a script you have to rename all entitys again. Say you have a script involving light1, mover1 and particle1 and want to have the same, but triggered difrently for light2, mover2 and particle2, you need to copie the script and change the entity names. OR is there a trick for that?
  2. @JackFarmer Oh, what I did with smoke getting throug walls is to let the particle fx start when you enter the room, and stop when you get out of the room.
  3. @JackFarmer I did encounter the same problem some times and have no solotion but a workaround with a transparent camera gui ^^ But I guess it shoud be possible to customise the particle fx, so it doesn't drip that far down, with the Particle Editor (in Entity menu).
  4. So, I have been learnig a bit about scripting today, and came up with a script to do the partial rotation of an entity eacht time it's triggerd. void Rotate45() { //Rotates func_mover "Star" 45 degrees. You can set rotation to 90 or -90 or whatever you wish $Star.time (2); //Time the entity "Star" takes to rotate 45 degrees $Star.accelTime (1); //Acceleration time of the movement $Star.decelTime (1); //Decelleration time of the movement $Star.rotateOnce( '0 0 45' ); //Number of degrees of rotation on 1 axis sys.trigger($Sound); //Triggers speaker entity "Sound" $Button.setKey( "trigger_when_opened" , "0" ); //Disables the button "Button" to trigger anything sys.waitFor($Star); //Makes this script stop until the movement of Star has finished sys.trigger($Sound); //Triggers speaker entity "Sound" $Button.setKey( "trigger_when_opened" , "1" ); //Enables the button "Button" to trigger again } The sound while rotating is now controlled by targeting a speaker entity named "Sound" but ... there should be a better way, I think, but I can't get it to work. Does anyone know how to get the following scriptEvent's to work? scriptEvent void accelSound(string sound); Sets the sound to be played when the mover accelerates. scriptEvent void decelSound(string sound); Sets the sound to be played when the mover decelerates. scriptEvent void moveSound(string sound); Sets the sound to be played when the moving.
  5. @JackFarmer I don't think it coul'd solve this. You would have to manually add a new "effect" (turn light off/on) for every light, and it would take even more time.
  6. Video I purpously didn't put nodraw texture on elements that should finally be invisable, so you can see what is happening. At the white wall: A horizontal slider setup with a "mover_elevator", to control horizontal motion. From the button on the pillar, you trigger a trigger_sequencer, to have the slider go to the next stop. It has a "set frobable" function to ensure each stage is completed before all is triggerd again. The red blocks on the wall are the actual elevator buttons. When you frob one, the slider will go to that position. This wil f*ck up the working for the button on the pilar however, but it shows how it works with a (simpler) multiple button setup. (This setup is quite compilcated and the "door stack" method, on the black wall, might be more usefull and simpler in most cases (I think). A rotating star that rotates 45 degrees and then stops. It uses a custom Stim/Response to make it stop. The Stim is in the little green cube, the Response in the little red cubes (select one cube > Entity (top of the editor window) > Stim/Response ). This setup wil have you rotate something in the same direction, 45 degrees each time, endlessly. At the black wall: The "genious" door stacks : D One is a rotating setup, the other a translating setup. The botom door binds to nothing, the door above binds to the botom door, the door above that binds to the door below it etc. Because everyone understands doors, this is a very easy way to create "complex motion". Of course you can have one door rotate, the other translate, an other rotate on an other axis etc. Is there even a limit to what you can do? Yes, it can't do what the black star can do ... ^^ Questions? Ask them. Motion.map
  7. @JackFarmer This doorstack can be used for the slidingmotion also, but then with a simpler setup : O Instead of the doors rotating I have them translating !! You can also have one door translating, and an other rotating. I see a lot of uses for movement here : ) WS6 has all the setups from WS5 also. WS6.map
  8. @JackFarmer Nice!! I have been playing with the door stack, that has also audio. You could get the mechanism for the audio from here and I think it's a neat trick that could be used in for things in the future. The turning back feature on this woud be a lot of hassle with the s/r setup in WS1. For all: in this WS5 map are all 3 mechanisms (for partial rotation and translation), so if you're curious you only have to download this one. WS5.map
  9. @JackFarmer Jack .. I just had an ingenius idea : A stack of doors !! See WS4. Only thing you have to do is put a button and a trigger_sequencer in the setup : ) Hope this idea works for your setup. Otherwise I'm willing to look at it if you upload your map : ) WS4.map
  10. @JackFarmer This is very typical : D It seems TDM starts freaking out when too many things happen in the same place or something. I've had a lot of unlogical things happen, and then somhow, by placing things further apart it, it can be solved sometimes. So you might try moving the star further away from the scene ... Hope it works. About the sound .. where should it come from, and did it work when tested in WS1?
  11. @JackFarmer Since I'm at it .. I made the slider setup with a atdm:target_set_frobable to take control of triggering, so the button can't be pushed while the slider is in motion. There is a lot of targeting going on so it might seem complicated, but it's rather simple ^^ Button push triggers the trigger sequencer. Trigger sequencer triggers the GoPos2 button. GoPos 2 button trigger she Slider (elevator) + the atdm:target_set_frobable (so the button is not frobabla anymore) + FrobOn1, a trigger relay, that delays a trigger for 1.1 seconds and then triggers the atdm:target_set_frobable again, to make the button frobabla again ... etc. : ) WS3.map
  12. @JackFarmer I don't know if it should go back to the starting position at some point, but since the wait time on the trigger relay is set to 3.7, when it travels all the way back to Pos1, funny things happen when you keep pushing het button. ===== Forget about the speed, made it a mover_elevator and the speed can be set. Replaced the WS2.map. WS2.map
  13. @JackFarmer For the translating entity A you can use a multistate mover. I didn't think of it yesterday : ) I'll make a setup for it.
  14. @JackFarmer Thanx : ) But getting a final map together does take a lot of time with all these ideas that come to my mind : P
  15. @JackFarmer I made something quite easy for the rotation with stim/respons that totally works : ) .... It might not work on a very small scale though .. but you could just bind a smaller thing to a bigger mechanism. The little red cubes have a response (select > Entity > Stim/Response ), the little brass cube has a stim. WS1.map
  16. @Amadeus Thanx. I have (ugly) buttons on the diorama now to switch on/off the lights and func_emitters in the blackboxes. It now has 5 transparent screens : ) https://streamable.com/7xy8n
  17. @JackFarmer One thing. I'm trying the rotation now and with she speed of the fun_rotation set to 45 and the delay of the trigger relay set to 1, it tends to overrotate a bit. The delay will be more like 0.993 .. and I'm afraid this wil in the end never be really 100% accurate for it might have to do with the clockspeed of you your computer, but I'm not sure about that. Happy Newyear for you too!!
  18. @JackFarmer For the rotating you need funk_rotation, and set "invert_on_trigger "0". This starts and stops rotating when triggered. I guess you can have it turn 45% with a trigger_relay. Say the func_rotation turns 360 degrees in 8 seconds, you trigger it, so it starts rotating, and trigger the trigger relay at te same time. Give the trigger relay a delay of 1 second and let it target the func_rotate, so it will automaticly stop after 1 second. For the translation, you could use a sliding door, that slides, lets say 1000 units in 10 seconds, so it can slide 10 times 100 units. Do the same with the trigger relay to have it stop automaticly. But, after triggering it from the start position, you have to trigger it 3 times very fast to have it not reverse. You could do that with 2 trigger relays with a very short delay like 0.001. If you can lay out more what the specific working should be I could try to make a setup and share the map. Probably scripting would be more accurate .. but I can't do that ^^
  19. Experimenting with the transparent camera gui I made a sort of magic diorama: https://streamable.com/7tkua
  20. I figured I could make a "holographic projection", a 50% reflective and 50% see-through screen at 45% angle between your point of view and a display. I used the camera gui as a display, and reflective water as the screen, and it works : ) I made a black box (bc black) to put the model, light and camera (target_null) inside. This is a small setup, but big setups would work also I guess, for having ghostly figures floating around and stuff. Themeparks and magicians use this trick also : ) https://streamable.com/44b3v ====== Why not just have a transparent nonsolid camera gui? camerascreentransparent1 { qer_editorimage textures/editor/cameragui.tga nonsolid translucent noshadows { remoteRenderMap 232 232 // width / height of render image, ie resolution of screen red Parm0 green Parm1 blue Parm2 scale -1, -1 translate -1, -1 map "camerascreentransparent1" blend gl_dst_alpha, gl_one } } It also works : )
  21. @Goldwell @kingsal I'm playing it right now .. and yes ther are some sloppy things but the atmosphere is really goodI There is a hut and near that is a wall/patch of trees .. and I have been looking for something like that to surround my build. Can I "steal" it from this map and use it?
  22. Have been working on a boiler to get warm bathwater in the bathroom : ) 2019-12-25 11-58-01 - Streamable If someone is interested in using it, let me know.
×
×
  • Create New...