Scripting questions

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Can't help

Post by tltrude »

Sorry, I can't help if you can't explain what you want. A rotating door can be triggered by a seperate trigger. The "targeted" flag has to be set and the trigger has to target the door.
Tom Trude,

Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

That exactly what I want Tom, A door that only opens when the trigger is used. But I want the door to have the lighthouse run sound and I want it to go slower than a regular door.
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ok, i got the other two script>objects to do their scripted actions B1 and B2 work but now all that isnt working is B3 which is basically a door that rotates on a center pivot but Its not just 1 single rectangular prism kind of brush. Ill take some screenies for you...

Before trigger is activated:
Image

Image

After trigger is activated:
Image

Image

The blue thing is the door that I want to rotate by the trigger. That is Targetname B3 and the trigger that you can see off to the bottom left is targetname S3. Everything else I think is pretty self explainatory.
There, those are the four Screen Shots I took. Does this explain it a little better?

... im not annoying the heck out of you am I? If I am just tell me and ill either shut up and find my own way to fix it or you just dont have to help me... actually u already dont have to but just let me know cuz im asking a lot of questions.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

b3 door

Post by tltrude »

You can't use rotateX 90 because that just makes it spin on the X axis at "speed" 90. The only rotate commands that use degrees are "rotateXup" and "rotateXdown"--also with Z and Y. They don't all make the door rotate up and down, so you just have to find the right axis to rotate on by trial and error.

You can also use negative numbers like this.

$S3 waittill trigger
$B3 rotateYup -90
$B3 waitmove

A positive number will make it rotate 90 degrees one direction, and a negative number will make it rotate 90 degrees in the opposite direction. Using "down" will also make it rotate the opposite of "up".

By the way, you can also add movement and sound (playsound click) to the button. And/or make it change color with "hide" and "show"commands. I have buttons like that for an elevator in my Door2 tutorial map--click on my signature logo to find that map.

What keeps players from being trapped inside your door when it closes?
Tom Trude,

Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

well i made it so that the door dosnt close after a certain point in time by taking out the "wait X" line and added another waittill trigger. but if the person got trapped hed have to w8 for the door to be opened or simply kill himself... but maybe ill eventually make a secret passage that you can only use if your trapped inside.

So I guess my only option is a rotating_door? aw that sux. Oh well. thnx for your help. If I have any more questions I'll post em in this thread (if their scripting related). thnx again for your help.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

read

Post by tltrude »

Maybe you should go back and read all the posts again, because you are not getting the message. Although you could use a func door to do all that stuff, my last post shows how to do it with scripting.

"They don't all make the door rotate up and down".

To fix the trapped player thing, you need a trigger_multiple inside the door. It can be set up to stop the door from closing until it is devoid of players.

Another thing to think about is light. If the door is inside its wall during the compile, there may be shadows on the sides and inside. So, the door has to be moved to a place where it will get light in the compile, and them moved to it normal position when the game starts. That way it won't have any shadows when it opens.
Tom Trude,

Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ah I see. Thnx for the tip and not wigging out on me for bein so thick head :oops: sry about... :oops: :oops: :oops:

1. Heres another question... I want a trigger to deactivate If axis is in a certain distance of it; is thi the right script to use?:

if (local.player.dmteam == "axis")
{
$S_Allies_Trans1 nottriggerable
}

and would I make a brush the size of the trigger deactivation area and make it some sort of trigger? or is there something else.

2. Also, How do i make it so that only Axis can trigger switch #1 and only allies can trigger switch #2? ive seen a thread about that somewhere but i can find it anymore.
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

AI wont walk path

ok, i have an AI:
Muliplayer_Allied_Airborne_Soldier
Targetname: Runner

and 224 units in front of him is a pathnode:
Targetname: 1

and 224 units in front of that is another pathnode:
Targetname: 2

and so on and so on until the pathnodes hit number 10. But when i start my map and I look at the guy, hes just kinda standing there. Here is the part of my script involving $Runner

Code: Select all

Runner:
$Runner runto $1
$Runner waitmove
$Runner runto $2
$Runner waitmove
$Runner runto $3
$Runner waitmove
$Runner runto $4
$Runner waitmove
$Runner runto $5
$Runner waitmove
$Runner runto $6
$Runner waitmove
$Runner runto $7
$Runner waitmove
$Runner runto $8
$Runner waitmove
$Runner runto $9
$Runner waitmove
$Runner runto $10
$Runner waitmove
$Runner runto $9
$Runner waitmove
$Runner runto $8
$Runner waitmove
$Runner runto $7
$Runner waitmove
$Runner runto $6
$Runner waitmove
$Runner runto $5
$Runner waitmove
$Runner runto $4
$Runner waitmove
$Runner runto $3
$Runner waitmove
$Runner runto $2
$Runner waitmove

goto runner
end
thats my exact script about anything that has anything to do with him. Did I do something wrong?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

threads

Post by tltrude »

You should start new forum threads for those--this one is about played out.
Tom Trude,

Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

aight, ill do that. Ill post in "scripting" forum.
Image
Post Reply