Making a good looking rope that winds up
Moderator: Moderators
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
Well, that's exactly my problem now. The endpoint does not update automatically, although I'm also not certain that my script origin is binding properly to the elevator ($ele_left_origin bind $ele_left should do it right?). I tried looping updateendpoint in a separate thread, like this:bdbodger - Have you tried it with a moving target yet? Will he have to loop "updateendpoint"?
Code: Select all
ele_left_updateendpoint:
while(1)
{
$ele_left_beam updateendpoint //targetname for the func_beam, with the command to update the endpoint
waitframe //not sure if this is long enough time to wait
}
endLook! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.
<Your MOHAA Mapping Friend in the Sky
>
<Your MOHAA Mapping Friend in the Sky
The beam does update if you do it right here is the script for the test clock I did with beams hc is hour the the hour center script origin that has the key rotatex I think it is and I forget the value right now but it rotates once per hour there are beams for the munutes and seconds too
main:
$h bind $hc
$s bind $sc
$m bind $mc
$sbeam maxoffset 0
$sbeam color ( 0 0 1 ) // blue
$sbeam numsegments 100
$sbeam endalpha .01
$sbeam life .001
$sbeam light 0 0 1 140
$sbeam lighton
$sbeam shootradius 50
$sbeam shoot
$sbeam activate
$mbeam maxoffset 2
$mbeam numsegments 2
$mbeam color ( 0 1 0 ) // green
$mbeam doactivate
$hbeam numsegments 8
$hbeam color ( 1 0 0 ) // red
$hbeam numsegments 100
$hbeam endalpha .5
$hbeam maxoffset 2
$hbeam doactivate
Thats it the whole script the func_beam targets the moveing script origins
The beams in that picture have the key:tileshader and value : textures/general_industrial/cable_wire
main:
$h bind $hc
$s bind $sc
$m bind $mc
$sbeam maxoffset 0
$sbeam color ( 0 0 1 ) // blue
$sbeam numsegments 100
$sbeam endalpha .01
$sbeam life .001
$sbeam light 0 0 1 140
$sbeam lighton
$sbeam shootradius 50
$sbeam shoot
$sbeam activate
$mbeam maxoffset 2
$mbeam numsegments 2
$mbeam color ( 0 1 0 ) // green
$mbeam doactivate
$hbeam numsegments 8
$hbeam color ( 1 0 0 ) // red
$hbeam numsegments 100
$hbeam endalpha .5
$hbeam maxoffset 2
$hbeam doactivate
Thats it the whole script the func_beam targets the moveing script origins
The beams in that picture have the key:tileshader and value : textures/general_industrial/cable_wire
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
well, I did a test and NOTHING is binding for me, I'm really not sure why. I'm trying to bind three things to this elevator, it's not complicated code and i've checked it a million times:
$ele_left_origin is obviously the origin
$ele_left_handle is just a handle that moves prior to the elevator moving
$ele_left_trigger is the elevator trigger
and $ele_left is the elevator itself
and none of the binds are working, i'm really not sure why at all, never had a problem like it. And yes I checked for mispelling the targetnames..... got me.
Here, I'll just post my whole code, I can't see this problem
just ignore all the little $ele_left1 $ele_left2's etc. (they're just wheels on the side). The elevators are $ele_left and $ele_right. The triggers in the map have a key: setthread value: ele_move, on both of them, so they call the ele_move thread when triggered. I don't know if this would affect their ability to be binded and moved... Earlier in the script I have thread ele_prep. And all the crazy numbers are stuff I'm experimenting with, doesn't affect the binding.
Code: Select all
$ele_left_origin bind $ele_left
$ele_left_handle bind $ele_left
$ele_left_trigger bind $ele_left
$ele_left_handle is just a handle that moves prior to the elevator moving
$ele_left_trigger is the elevator trigger
and $ele_left is the elevator itself
and none of the binds are working, i'm really not sure why at all, never had a problem like it. And yes I checked for mispelling the targetnames..... got me.
Here, I'll just post my whole code, I can't see this problem
Code: Select all
ele_prep:
level.elepos = 0
$ele_left1 time 8.675
$ele_left2 time 8.675
$ele_left3 time 8.675
$ele_left4 time 8.675
$ele_left5 time 8.675
$ele_left6 time 8.675
$ele_left7 time 8.675
$ele_left8 time 8.675
$ele_right1 time 8.675
$ele_right2 time 8.675
$ele_right3 time 8.675
$ele_right4 time 8.675
$ele_right5 time 8.675
$ele_right6 time 8.675
$ele_right7 time 8.675
$ele_right8 time 8.675
$ele_left_pulley time 8.675
$ele_right_pulley time 8.675
$ele_left_handle time 1
$ele_right_handle time 1
$ele_left_trigger triggerable
$ele_right_trigger triggerable
end
ele_move:
$ele_left_trigger nottriggerable
$ele_right_trigger nottriggerable
if (level.elepos == 0)
{
waitthread leftdown_rightup
}
else if (level.elepos == 1)
{
waitthread leftup_rightdown
}
$ele_left_trigger triggerable
$ele_right_trigger triggerable
end
leftdown_rightup:
$ele_left_handle rotateZup 90
$ele_right_handle rotateZdown 90
$ele_left_handle playsound click
$ele_right_handle playsound click
$ele_left_handle move
$ele_right_handle waitmove
wait .2
$ele_left_origin bind $ele_left
$ele_left_handle bind $ele_left
$ele_left_trigger bind $ele_left
$ele_left time 8.675
$ele_left moveDown 694
$ele_left1 moveDown 694
$ele_left2 moveDown 694
$ele_left3 moveDown 694
$ele_left4 moveDown 694
$ele_left5 moveDown 694
$ele_left6 moveDown 694
$ele_left7 moveDown 694
$ele_left8 moveDown 694
$ele_right_origin bind $ele_right
$ele_right_handle bind $ele_right
$ele_right_trigger bind $ele_right
$ele_right time 8.675
$ele_right moveUp 694
$ele_right1 moveUp 694
$ele_right2 moveUp 694
$ele_right3 moveUp 694
$ele_right4 moveUp 694
$ele_right5 moveUp 694
$ele_right6 moveUp 694
$ele_right7 moveUp 694
$ele_right8 moveUp 694
$ele_left1 rotateZup 3614.8428
$ele_left2 rotateZup 3614.8428
$ele_left3 rotateZup 3614.8428
$ele_left4 rotateZup 3614.8428
$ele_left5 rotateZdown 3614.8428
$ele_left6 rotateZdown 3614.8428
$ele_left7 rotateZdown 3614.8428
$ele_left8 rotateZdown 3614.8428
$ele_right1 rotateZdown 3614.8428
$ele_right2 rotateZdown 3614.8428
$ele_right3 rotateZdown 3614.8428
$ele_right4 rotateZdown 3614.8428
$ele_right5 rotateZup 3614.8428
$ele_right6 rotateZup 3614.8428
$ele_right7 rotateZup 3614.8428
$ele_right8 rotateZup 3614.8428
$ele_left_pulley rotateXdown 2485.2044
$ele_right_pulley rotateXdown 2485.2044
$ele_left loopsound m2l1_gate_open
$ele_left move
$ele_left1 move
$ele_left2 move
$ele_left3 move
$ele_left4 move
$ele_left5 move
$ele_left6 move
$ele_left7 move
$ele_left8 move
$ele_right loopsound m2l1_gate_open
$ele_right move
$ele_right1 move
$ele_right2 move
$ele_right3 move
$ele_right4 move
$ele_right5 move
$ele_right6 move
$ele_right7 move
$ele_right8 move
$ele_left_pulley move
$ele_right_pulley waitmove
$ele_left loopsound m2l1_gate_open wait
$ele_right loopsound m2l1_gate_open wait
$ele_left_handle time 1
$ele_right_handle time 1
level.elepos = 1
end
leftup_rightdown:
$ele_left_handle rotateZdown 90
$ele_right_handle rotateZup 90
$ele_left_handle playsound click
$ele_right_handle playsound click
$ele_left_handle move
$ele_right_handle waitmove
wait .2
$ele_left_origin bind $ele_left
$ele_left_handle bind $ele_left
$ele_left_trigger bind $ele_left
$ele_left time 8.675
$ele_left moveUp 694
$ele_left1 moveUp 694
$ele_left2 moveUp 694
$ele_left3 moveUp 694
$ele_left4 moveUp 694
$ele_left5 moveUp 694
$ele_left6 moveUp 694
$ele_left7 moveUp 694
$ele_left8 moveUp 694
$ele_right_origin bind $ele_right
$ele_right_handle bind $ele_right
$ele_right_trigger bind $ele_right
$ele_right time 8.675
$ele_right moveDown 694
$ele_right1 moveDown 694
$ele_right2 moveDown 694
$ele_right3 moveDown 694
$ele_right4 moveDown 694
$ele_right5 moveDown 694
$ele_right6 moveDown 694
$ele_right7 moveDown 694
$ele_right8 moveDown 694
$ele_left1 rotateZdown 3614.8428
$ele_left2 rotateZdown 3614.8428
$ele_left3 rotateZdown 3614.8428
$ele_left4 rotateZdown 3614.8428
$ele_left5 rotateZup 3614.8428
$ele_left6 rotateZup 3614.8428
$ele_left7 rotateZup 3614.8428
$ele_left8 rotateZup 3614.8428
$ele_right1 rotateZup 3614.8428
$ele_right2 rotateZup 3614.8428
$ele_right3 rotateZup 3614.8428
$ele_right4 rotateZup 3614.8428
$ele_right5 rotateZdown 3614.8428
$ele_right6 rotateZdown 3614.8428
$ele_right7 rotateZdown 3614.8428
$ele_right8 rotateZdown 3614.8428
$ele_left_pulley rotateXup 2485.2044
$ele_right_pulley rotateXup 2485.2044
$ele_left loopsound m2l1_gate_open
$ele_left move
$ele_left1 move
$ele_left2 move
$ele_left3 move
$ele_left4 move
$ele_left5 move
$ele_left6 move
$ele_left7 move
$ele_left8 move
$ele_right loopsound m2l1_gate_open
$ele_right move
$ele_right1 move
$ele_right2 move
$ele_right3 move
$ele_right4 move
$ele_right5 move
$ele_right6 move
$ele_right7 move
$ele_right8 move
$ele_left_pulley move
$ele_right_pulley waitmove
$ele_left loopsound m2l1_gate_open wait
$ele_right loopsound m2l1_gate_open wait
$ele_left_handle time 1
$ele_right_handle time 1
level.elepos = 0
endLook! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.
<Your MOHAA Mapping Friend in the Sky
>
<Your MOHAA Mapping Friend in the Sky
bind
Bind only has to be done one time, so put all of the bind lines in prep. You can still reotate or move something that is bound to another object. So for the little wheels, bind them to the elevator and then use "rotateZ 360" to start them and rotateZ 0 to stop them rotating--the number is speed of rotation. "waitmove" will stop the script until the object finishes its move--you probably know that.
Perhaps you should tripple check your targetnames--even a capital letter will screw it up. Also, check for errors in the console--make a qconsole.log in main by typing "logfile 1" in the console just before you start the server to test the map.
Perhaps you should tripple check your targetnames--even a capital letter will screw it up. Also, check for errors in the console--make a qconsole.log in main by typing "logfile 1" in the console just before you start the server to test the map.
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
I checked the logfile, no errors, and when I tried to bind the wheels they didn't bind either. I also triple checked my targetnames, all good. However, I didn't notice this before, but when it compiles it shows a lot of errors for entity duplicate planes. EG, it says:
Entity 47, Brush 1: Duplicate Plane (then repeats this line about 20 times)
Entity 49, Brush 1: Duplicate Plane (repeats this 20 times)
and it lists probably 20 more entities.
Some of these entities are involved in the elevator. Now I know what a duplicate plane is for normal brushes, that's pretty obvious. But I checked all the entitites it listed, none of them overlap anything. They aren't in a duplicate plane with anything. Does this error message refer to anything else?
edit* just saw this too, after all the errors it says: "entity reached from outside, no filling" now that I've never seen
Entity 47, Brush 1: Duplicate Plane (then repeats this line about 20 times)
Entity 49, Brush 1: Duplicate Plane (repeats this 20 times)
and it lists probably 20 more entities.
Some of these entities are involved in the elevator. Now I know what a duplicate plane is for normal brushes, that's pretty obvious. But I checked all the entitites it listed, none of them overlap anything. They aren't in a duplicate plane with anything. Does this error message refer to anything else?
edit* just saw this too, after all the errors it says: "entity reached from outside, no filling" now that I've never seen
Look! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.
<Your MOHAA Mapping Friend in the Sky
>
<Your MOHAA Mapping Friend in the Sky
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
ok, forget those duplicate plane entities, I just remade them and that got rid of the errors. It still gives me the error "entity reached from outside -- no filling", not sure what that's about. I'm gonna test it as soon as it's done compiling to see if the binding works yet.
*edit* ok, forget that entity reached from outside crap too, just did a search and found out it says that when there's a leak into the void (which I made on purpose).
*double edit* well, the errors are gone, but I still CANNOT bind stuff....this is real weird. Repeat, bind does NOT work yet.
*edit* ok, forget that entity reached from outside crap too, just did a search and found out it says that when there's a leak into the void (which I made on purpose).
*double edit* well, the errors are gone, but I still CANNOT bind stuff....this is real weird. Repeat, bind does NOT work yet.
Look! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.
<Your MOHAA Mapping Friend in the Sky
>
<Your MOHAA Mapping Friend in the Sky
Duplacate planes
Duplacate planes are caused by moving the verticies of brushes, or by a wayward cut. You can get rid of them with the Rogue plugins. The other error is a leak in your skybox and you can see where it is by hitting file > pointfile. Neither of those will cause binding to fail.
You can find out about the Rogue Plugins here: /forum/viewtopic.php?t=6790&highlight=rogue
Check to see if your script threads are running by placing a few debug lines in your script.
iprintln "The elevator has been setup, awaiting trigger."
iprintln "The trigger has fired."
iprintln "The elevator is moving up."
ect...
You can find out about the Rogue Plugins here: /forum/viewtopic.php?t=6790&highlight=rogue
Check to see if your script threads are running by placing a few debug lines in your script.
iprintln "The elevator has been setup, awaiting trigger."
iprintln "The trigger has fired."
iprintln "The elevator is moving up."
ect...
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
oops, made that edit before you posted that. But anyway, yes, I know the script is running because the elevator moves while the stuff I'm binding to it stays in place. And I know that the ele_prep method (the one with my bindings) is running because my 'time xx' statements are all there and those are all running. For some reason I simply can't bind anything at all. My elevator has multiple brushes for one entity, could the other pieces possibly have a problem binding to multiple brushes?
Look! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.
<Your MOHAA Mapping Friend in the Sky
>
<Your MOHAA Mapping Friend in the Sky
no
It doesn't matter how many brushes your script_object elevator has, as long as it is all one script_object with the "ele_left" targetname. I will be on MSN for the next 30 min (contact name tltrude).
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
Help
If you should learn anything more about using beams as ropes or cables, other than what bdbodger has posted, I hope you will pass the knowlege along for the use of other mappers.
Good luck!
Good luck!
-
BirdsofaFeather
- Sergeant
- Posts: 72
- Joined: Sun Aug 24, 2003 3:49 am
Well, I did find this out. Unless you want your beam to wave around like crazy, make sure you have this property set:
key: maxoffset
value: 0
The maxoffset is the maximum distance that the beam can move from it's planned trajectory. So if you want a non-wavering beam, make the maxoffset 0. And make sure to click the property START ON if you want the beam to.....start on...because the beam will not automatically turn on. That's all that I have really used.
key: maxoffset
value: 0
The maxoffset is the maximum distance that the beam can move from it's planned trajectory. So if you want a non-wavering beam, make the maxoffset 0. And make sure to click the property START ON if you want the beam to.....start on...because the beam will not automatically turn on. That's all that I have really used.
Look! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.
<Your MOHAA Mapping Friend in the Sky
>
<Your MOHAA Mapping Friend in the Sky

