setrotation


(Loffy) #1

hi!
What are the values/meaning, for the three numbers in setrotation?
Example (from goldrush), with three numbers: setrotation 0 300 0
Thx in advance!
// Loffy


(BXpress) #2

0 300 0
X - Y - Z


(Loffy) #3

Loffy, u noob. Its in the reference documentation! Appendix A (Scripting commands)!
Snip:
“Setrotation <pitchspeed> <yawspeed> <rollspeed>
Sets the rotational velocity of an entity.”

Hm.
/ L.


(BXpress) #4

um okay^^


(Loffy) #5

Hi!
Ok, I got a thing spinning (a fan). My problem now, is that it rotates around the centre of the map.
I want the thing to rotate around itself. How can I trick the thing to do that?
Ill keep on trying. Will post here, if I get it to work.
// L.


(sock) #6

Give the fan (entity) an origin brush. If you are not sure what an origin brush is, then check the map “goldrush”. All the func_constructibles have origin brushes.

Sock
:moo:


(Loffy) #7

Wilco!
(Im “in” goldrush atm. Man! It must have taken 1000 hours to make that map! All the details!) Also analyzing the .script closely. The setrotate-thing is a sidetrack. I am really “in” here to study the spawn/wolf_obj. entities and related scripting. Making progress. Slow, but steady.)
//Loffy


(swaggers) #8

The ceilingfan in the middle spawn in Gold Rush does not have an origin brush that I can see and that one works fine.

What’s up there?


(sock) #9

Yes it does, hide the top wooden support on the ceiling and you will see a small little origin brush at the top of the fan entity. The origin brush does not have to be a set size to work, just exist as part of the entity.

Sock
:moo:


(swaggers) #10

missed it. Thanks.


(Loffy) #11

That’s the one!
I had a look at it, and wanted to do one myself.
Like Swaggers, I couldnt find the origin brush. But apparently it was up there the whole time.
:slight_smile:

Still have some problems though:
I create a brush. Give it a texture.
Right click > script_mover.
Press N, scriptname abc
I also check the box “solid”.
Create another brush, smaller, and ontop of the first brush.
Texture it with “origin”.
Right click > script_mover.
Press N, to check “solid”.
Deselect all. Then select origin brush and that first brush (together).
Press Crtl + K.
Deselect all. Save, compile.

Here are the details from my script

abc
{
spawn
{
wait 100
setrotation 0 300 0
}
}

Problem: I get an error message when I try to run the map: “Script_mover must have a ‘model’”.
Hm. I will try to solve this one myself. But if anyone has a clue what is wrong please let me know what you think.
Loffy.


(Loffy) #12

Ah, found the problem! (The press ctrl + k thing was wrong!)
Solved it!
Loffy


(sock) #13

Stop that right now, its silly! :wink: To include an origin brush into an existing “script_mover” entity. Simply select the “script_mover” and the new origin brush, right click in the 2d window and select the option “move into entity”. De-select your entity and thats it. The origin brush has been merged into the “script_mover” enity. Btw this works for any entity which is based on brushwork.

Sock
:moo: z0r