|GG|Carl Posted March 6, 2004 Share Posted March 6, 2004 I'm making something Indiana Jones inspired, and of course there's gonna be a huge stone rolling after you! A more exact desctiption: You get thrown into a room, you look behind you, see the stone rolling towards you. You run down a long hallway, and the stone is following you. But I don't exactly know how to do this. In other words, I could have use for something between func_train and func_rotate. I noticed that the asteriods on the new asteriods map fly around, rotate and break at the same time! How did they do this? NOTE: At the moment, a round func_train with only one color follows you (use your imagination, and it looks like the stone is rolling!). Not very cool, but it still works pretty ok. Link to comment Share on other sites More sharing options...
WadeV1589 Posted March 6, 2004 Share Posted March 6, 2004 Icarus, you can move entities and rotate them all at once. affect("thingy",INSERT) { move(<0 0 0>,<100 0 0>,3000); rotate(<360 0 0>,3000); } Will rotate something 360 degrees while moving it 100 units over a period of 3 seconds, although you should use ref_tags for exact locations. Link to comment Share on other sites More sharing options...
|GG|Carl Posted March 6, 2004 Author Share Posted March 6, 2004 I didn't quite understand all of that... Originally posted by WadeV1589 affect("thingy",INSERT) { move(<0 0 0>,<100 0 0>,3000); rotate(<360 0 0>,3000); } Where to put the icarus-file? And how do I "name" stone? (Shall i use targetname?) Originally posted by WadeV1589 Will rotate something 360 degrees while moving it 100 units over a period of 3 seconds, although you should use ref_tags for exact locations. How to use ref_tags? Link to comment Share on other sites More sharing options...
lassev Posted March 6, 2004 Share Posted March 6, 2004 I suggest you go and find a tutorial explaining how to make scripted elevators. There's also some old threads about that right here at LucasForums (for JO but works as well in JA). Those will explain you how to move objects with scripting, using ref_taqs. Link to comment Share on other sites More sharing options...
|GG|Carl Posted March 6, 2004 Author Share Posted March 6, 2004 Ok, thanks. EDIT: I can't find anything, does anyone happen to have a link? Link to comment Share on other sites More sharing options...
|GG|Carl Posted March 7, 2004 Author Share Posted March 7, 2004 I found a tutorial, downlaoded behavEd, created some ref_tags and wrote a script. But now I'm stuck. Look here: //Generated by BehavEd rem ( "the rolling stone!" ); affect ( "stone", INSERT ) { rotate ( < 360.000 0.000 0.000 >, 3000 ); move ( $tag( "stone2spot1", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot2", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot3", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot4", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot5", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot6", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot7", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot8", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); move ( $tag( "stone2spot9", ORIGIN)$, < 0.000 0.000 0.000 >, 1000.000 ); } The whole thing seems so stupid to me! Did I really have to make 9 "move thingys"? And how to make the script get started by a trigger? How do I make the script loop itself? How do I apply the code to the map? How do I give the stone a targetname, when it's just a normal brush? (convert it to what?) Will this work at all? Link to comment Share on other sites More sharing options...
|GG|Carl Posted March 8, 2004 Author Share Posted March 8, 2004 Guess what? It didn't work! Any ideas? Link to comment Share on other sites More sharing options...
lassev Posted March 9, 2004 Share Posted March 9, 2004 Go check this thread for a better scripted elevator tutorial. You script above is missing some vital points (meaning you haven't yet grasped the whole meaning of the commands you are using). http://www.lucasforums.com/showthread.php?s=&threadid=110416 After reading that, you should be able to answer some of your own questions. Link to comment Share on other sites More sharing options...
|GG|Carl Posted April 10, 2004 Author Share Posted April 10, 2004 This is what the script looks like right now: //Generated by BehavEd rem ( "the rolling stone!" ); affect ( "stone2", /*@AFFECT_TYPE*/ FLUSH ) { wait ( 0.001 ); move ( $tag( "stone2spot2", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot3", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot4", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot5", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot6", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot7", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot8", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot9", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); move ( $tag( "stone2spot1", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); } But... It still doesn't work... When the script gets used the stone spawns in the middle of the map, invisible. It doesn't move or rotate or anything like that... Link to comment Share on other sites More sharing options...
WadeV1589 Posted April 10, 2004 Share Posted April 10, 2004 For a start once you issue a move command it 'gets put onto another runner' or something like that...what I mean is even though you're telling the move command to take 3 seconds, once the move command has been executed the next command will be executed immediately. So move ( $tag( "stone2spot2", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 0.001 ); should become move ( $tag( "stone2spot2", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000 ); Also you don't need all 3 values for the move command, this works: move ( $tag( "stone2spot2", ORIGIN)$, 3000.000 ); wait ( 3000 ); and that should do what you are wanting Link to comment Share on other sites More sharing options...
|GG|Carl Posted April 12, 2004 Author Share Posted April 12, 2004 Thanks a lot man! I guess the script works now, but still the same problem as before, The stone spawns invisible in the middle of the map when I run the script... I'll tell you exactly what I'm doing: I have created a func_static with an orgin brush inside. I've created some ref_tags as well. I know the target_scriptrunner works. The func static has those values and keys: script_targetname stone2 targetname stone2 classname func_static spawnflags 8 (crusher) dmg 190 The ref tags has those values and keys: orgin 7160 384 -1232 (or whatever the orgin is) classname ref_tag targetname stone2spot1 (stone2spot2, stone2spot3 etc.) The script now looks like this: //Generated by BehavEd rem ( "the rolling stone!" ); [color=red]affect ( "stone2", /*@AFFECT_TYPE*/ FLUSH )[/color] { wait ( 3000.000 ); move ( $tag( "stone2spot2", [color=red]ORIGIN[/color])$, < [color=red]360.000[/color] 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot3", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot4", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot5", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot6", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot7", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot8", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot9", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot1", ORIGIN)$, < 360.000 0.000 0.000 >, 3000.000 ); } (the red stuff = stuff that I think might be wrong) Link to comment Share on other sites More sharing options...
WadeV1589 Posted April 12, 2004 Share Posted April 12, 2004 Try doing what I said before, move the second bit of information, you don't need all 3 values for the move command, only the first and last...but being the strange thing Icarus is, it will look like this: move ( $tag( "stone2spot2", ORIGIN)$, 3000.000 ); Link to comment Share on other sites More sharing options...
|GG|Carl Posted April 12, 2004 Author Share Posted April 12, 2004 But then it won't rotate, right? Link to comment Share on other sites More sharing options...
WadeV1589 Posted April 12, 2004 Share Posted April 12, 2004 Erm...the move command doesn't rotate the brush, its format is move(from, to, time). If you want to get it to rotate you can issue a single command at the very start (if the stone is going in a straight line). rotate(< 1440 0 0 >, 27000) As you can see all you have to do is set the first value to a nice high number (1440=360*4 so it'll do 4 full rotations) and the second number is the time to take in milliseconds. This will be executed and then the rest executed while this is still being performed, the result is a rolling moving object. Link to comment Share on other sites More sharing options...
|GG|Carl Posted April 12, 2004 Author Share Posted April 12, 2004 Finally I think I understand... This is what it''s supposed to look like, right? //Generated by BehavEd rem ( "the rolling stone!" ); affect ( "stone2", /*@AFFECT_TYPE*/ FLUSH ) { rotate ( < 1440.000 0.000 0.000 >, 27000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot2", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot3", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot4", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot5", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot6", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot7", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot8", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot9", ORIGIN)$, 3000.000 ); wait ( 3000.000 ); move ( $tag( "stone2spot1", ORIGIN)$, 3000.000 ); } Link to comment Share on other sites More sharing options...
WadeV1589 Posted April 12, 2004 Share Posted April 12, 2004 Right. Link to comment Share on other sites More sharing options...
|GG|Carl Posted May 31, 2004 Author Share Posted May 31, 2004 Not right. The stone spawns on the last tag and stays there btw, I did something to the 3d view so now you can only see the closest brushes, does anyone know how to make you able to see all brushes again? Link to comment Share on other sites More sharing options...
lassev Posted May 31, 2004 Share Posted May 31, 2004 Do you mean that when you launch the game, the rock is spawned where you placed it in Radiant? Or is it really where the last tag is? And the last tag is in a different place than where the stone is in Radiant? Do you have some other scripts affecting the rock? Otherwise your script doesn't seem to have anything wrong at first glance, except the rotate command, which won't help you very much, since it only accepts and affects absolute angle values, not relative. Since you have correctly used ordinary targetnames for the ref_tags that doesn't seem to be a problem. Be also sure the script really executes, and the rock isn't just standing where you placed it in Radiant. I don't know if it matters, but the func_static has no use for the ordinary targetname. Erm...the move command doesn't rotate the brush, its format is move(from, to, time). This isn't exactly true. It seems Raven has changed the specifications from the documented ones. The first vector is target destination, and the second one is indeed rotation... Link to comment Share on other sites More sharing options...
wedge2211 Posted May 31, 2004 Share Posted May 31, 2004 Originally posted by |GG|Carl btw, I did something to the 3d view so now you can only see the closest brushes, does anyone know how to make you able to see all brushes again? Turn off cubic clipping. Link to comment Share on other sites More sharing options...
lauser Posted June 1, 2004 Share Posted June 1, 2004 I'm also trying to do the same thing here. I want the rolling objects to be triggered and then roll down to a final destination. Then I want those objects to REspawn at the top again. I'll have a look at the tutorials here and give it a try...then post later when I'm really stumped. Link to comment Share on other sites More sharing options...
|GG|Carl Posted June 1, 2004 Author Share Posted June 1, 2004 Originally posted by lassev Do you mean that when you launch the game, the rock is spawned where you placed it in Radiant?Or is it really where the last tag is? And the last tag is in a different place than where the stone is in Radiant? Do you have some other scripts affecting the rock? When I launch my map the stone isn't there. When I launch the script the stone spawns at the last ref_tag, stone2spot9. The stone doesn't spawn where it's placed in radiant, since it's placed on the first tag. I have no other scripts in the map. I don't know if it matters, but the func_static has no use for the ordinary targetname. Link to comment Share on other sites More sharing options...
lassev Posted June 1, 2004 Share Posted June 1, 2004 Originally posted by |GG|Carl What I meant is that if you target (or use) func_static with the ordinanary targetname, it will just use it's own target (or usescript most probably). So, for your purposes, I don't see why your func_static would need anything other than the script_targetname. It's hard to say what might be wrong with this rock of yours. I'm inclined to think it's some fundamental issue I cannot see based on the information you have given here. OK. Do you mean by spawning, that the func_static is in some temporary place, away from the playeable area, and when the script starts, it should first move the rock to the first tag, then roll it along the tags to the last one? And also, your last tag isn't "stone2spot9" but "stone2spot1", if you have a look at the script you posted above. Link to comment Share on other sites More sharing options...
|GG|Carl Posted June 1, 2004 Author Share Posted June 1, 2004 You see, my idea is to place the stone on stone2spot1, and then make it move like: stone2spot2>stone2spot3> ... >stone2spot9>stone2spot1 So it'll stop where it started, on stone2spot1. But does where I place the stone in radiant really affect where it's placed in the game? Shouldn't I get it to spawn at stone2spot1 before I make it move? Link to comment Share on other sites More sharing options...
lassev Posted June 1, 2004 Share Posted June 1, 2004 A func_static is loaded when the level starts and placed right where you placed it in Radiant. So, it's not spawned like, say NPCs, because it has no such function. "Spawning" would require that when you "use" the targetname, it would appear out of nowhere to its location. If your func_static is not there, when you start the level, then I have no idea at all, what is going on. The only ways you have at your disposal to make a func_static disappear, is to either use the remove command (would be like "despawn") or use the set_invisible script command, which would make it invisible, obviously. So, if your func_static appears to the start point of the circular path (which is also the end point as you explained), but does not move anywhere, then I would say your script is not launched at all. EDIT: Well, I can always add one thing here: If you are mapping MP, then it will reduce somewhat my credibility, since I have no experience of MP mapping... Link to comment Share on other sites More sharing options...
|GG|Carl Posted June 4, 2004 Author Share Posted June 4, 2004 But what about the ref_tags? Are they suppoased to have targetmanes or script_targetnames? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.