Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Outcast and Jedi Academy Editing Forum → Scripting
Scripting
2004-04-12, 3:43 AM #1
OK,
I'm trying to make a simple script for a welding arm that moves from side to side and maybe telescopes, if I get that far.
It says:
Code:
//Generated by BehavEd

rem ( "A rather simple welding arm." );

affect ( $tag( "base", ORIGIN)$, $1 1 1$ )
{

	loop ( -1 )
	{
		move ( $tag( "l_pos", ORIGIN)$ );
	}

}

in Notepad. As you can see, I am using BehavEd. I want various parts of it to move over to another part of the machine they're working on. This isn't the complete script BTW, but it won't compile.

Help?

------------------
"Have you ever noticed that if you rearranged the letters in mother in law, they come out to Woman Hitler?"
"Isn't it funny how the word 'politics' is made up of the words 'poli' meaning 'many' in Latin, and 'tics' as in 'bloodsucking creatures’?"

Contrary to most tutorials, JK2Radiant is terrible.

Well don't just sit there, REPLY!!!
2004-04-12, 6:48 AM #2
In BehaveEd, what does the error say?

------------------
Snail racing: (500 posts per line)

------@%
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2004-04-12, 8:51 AM #3
Code:
error: syntax error: expected string: found IDENTIFIER

Line:

 affect ( $tag( "base", ORIGIN)$, $1 1 1$ 0

I have no idea what I'm doing, anyway...
If someone would make the script for me, that would be very nice!

------------------
"Have you ever noticed that if you rearranged the letters in mother in law, they come out to Woman Hitler?"
"Isn't it funny how the word 'politics' is made up of the words 'poli' meaning 'many' in Latin, and 'tics' as in 'bloodsucking creatures’?"

Contrary to most tutorials, JK2Radiant is terrible.

Well don't just sit there, REPLY!!!
2004-04-12, 10:50 AM #4
hhhmmmm. well i just no little bits and pieces of scripting (mainly cutscenes and npc routing) so i cant really figure this out. Sorry.

------------------
Madquack and Firbnic have a signature.
Remnant Temple Part A beta test.
Light And Darkness
I was just petting the bunny, and it went into the soup can, and part of my hand went with it. - Red vs Blue
2004-04-13, 5:19 AM #5
The problem is in the affect thing. If you would want to affect the welding arm, which targetname would be, let's say, welding_arm, the affect would look like this:
Code:
affect ( "welding_arm", /*@AFFECT_TYPE*/ FLUSH )


For example, here's an script from JO. The script makes an elevator go up, and then down. This shows how to make an object to move from point A to point B. It also has buttons on it, but I hope this still helps a little bit:
Code:
//Generated by BehavEd

rem ( "works the elevator in the tower...goes up waits and then goes down" );
sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/movers/switches/switch1.mp3" );
use ( "tbutton" );

affect ( "tower", /*@AFFECT_TYPE*/ FLUSH )
{
	task ( "up" )
	{
		move ( $tag( "tower_up", ORIGIN)$, 1000.000 );
	}


	task ( "dn" )
	{
		move ( $tag( "tower_dn", ORIGIN)$, 1000.000 );
	}

	dowait ( "up" );
	wait ( 2000.000 );
	dowait ( "dn" );
	use ( "tbutton" );
}


By the way, I could do you the welding arm script, just give me the details that when and what it should do, and I will try to do it.

[This message has been edited by Heke7 (edited April 13, 2004).]

[This message has been edited by Heke7 (edited April 13, 2004).]
There 10 kinds of people in the world: Those who understand binary arithmetics, and those who don't.
2004-04-16, 10:52 AM #6
Thanks, Heke7!

I see how to do the affect thing now, but you offered, and I'm lazy. What I want-
A welding arm, made of about 5 sections total:
-A square base coming from a non-moving ceiling or railing.
-A circular section coming from the base straight down to
-A smaller diameter curved section at about a 120 degree angle to the first pipe.
-Another cylinder at the same angle as the last one. It should be able to telescope into the last pipe.
-Finally, a welding arm. A very small diameter pipe or a long, thin piece of metal, at a 90 degree angle to the very first pipe.


The first pipe attaches to the second pipe and the base. I may ask you to rotate anything below this, depending on how I implement the script. The next pipe is stationary relative to the first pipe, and is attached as stated. The third pipe and welder need to retract back most of the way when the fixture moves. Also, I need to trigger some spark fx_runners when the welder comes to the metal.
The way it moves-
Sparks are flying from the weapon it is working on. The welder and third pipe move back into pipe #2, and the entire fixture moves to down the railings to the side. The welder and pipe move out again, and sparks fly from the new location. It stays there a while, and then retracts and goes to the old location...

The railing has nothing to do with the actual script-I just put it there as a reference.
This should be able to be turned on/off by a button and/or a trigger.

Tell me if you can't do this, and I'll make it simpler.

Thank you so much! You will definately get full credit for this.


(Edit: The list UBB wasn't working today. It doesn't like me. [http://forums.massassi.net/html/frown.gif] )
------------------
"Have you ever noticed that if you rearranged the letters in mother in law, they come out to Woman Hitler?"
"Isn't it funny how the word 'politics' is made up of the words 'poli' meaning 'many' in Latin, and 'tics' as in 'bloodsucking creatures’?"

Contrary to most tutorials, JK2Radiant is terrible.

Well don't just sit there, REPLY!!!

[This message has been edited by Spi Waterwing (edited April 16, 2004).]

[This message has been edited by Spi Waterwing (edited April 16, 2004).]

[This message has been edited by Spi Waterwing (edited April 16, 2004).]
2004-04-18, 2:22 AM #7
Good to know it worked. I'll try to make the welding arm, but if I don't get it work I'll let you know.
There 10 kinds of people in the world: Those who understand binary arithmetics, and those who don't.

↑ Up to the top!