Boothand Posted October 26, 2013 Posted October 26, 2013 I've got an idea that requires me to move brushes relative to their current position. I was hoping there would be a way to do math equations within Behaved, but I haven't found a way with my limited experience. What I was thinking of was something along the lines of move ( $get( VECTOR, "SET_ORIGIN")$ which (I believe) would get the entity's origin. Then I'd want to simply do + (x y z) and add coordinates to the origin. It sounds like a thing that should logically work! Any ideas how to move brushes relatively? Edit: There is something called set_z_offset which can do it only along the Z axis, and you can't set the speed in the traditional way. The description says "Vertical offset from original origin... offset/ent's speed * 1000ms is duration". I can confirm this feature works. So it can't be that far away?
Boothand Posted November 1, 2013 Author Posted November 1, 2013 Maybe instead someone could help me think of a better way to do something. I don't wanna create a new topic, as relative positions would be ultimate solution though... I'm creating a magic staircase. Or an infinite one, if relative positions were working. I'm creating a staircase that only consists of two single steps (step1 and step2). When you step on step2 it runs a script where step1 and the trigger that belongs to it, moves in place for you to step forward again. Then when you step on step1 it runs a script where step2 and its trigger gets up infront of step1 again. This works, I can confirm that. And I only need two scripts. But it creates really really a lot of work, and huge scripts, and busy looking map files since I have to deal with very many tags/vectors. I'm currently using the "if parmX is X, on this and that step and trigger, move step and trigger to tag and set parmX to X". I would really like just a function, one that would get the current origin, add values to the vector, set this as the new origin and then run the same function next time it's triggered. This could be useful for a lot of stuff though, not just this one (stair)case. Any suggestions?
Asgarath83 Posted November 1, 2013 Posted November 1, 2013 mmm, the origin is just a single coordinate point in entire map. how much probabilities are the player'is in that oriigin for start the script? I never try this kind of thing, but it's very interessing. you can post some screen? I wanna to understand better.Your are trying to create something like an infinite, perpetual staircase? O.o like the picture of Escher?
Boothand Posted November 1, 2013 Author Posted November 1, 2013 Not like Escher But that would be the top of interesting, of course. Actually, it's just a staircase that "builds itself" while you're walking it. Only 2 steps exist in the staircase. So I was thinking that I would include it in a sort of puzzle, where the player needs to reach a level/platform high up that he can't reach. It doesn't go in circles, just straight forward. I've thought of a lot of things, but I can't think of a smart way to do it. Not unless you can move several entities with a single command either. I could make it the hard way, but it would have very low re-production value.
Asgarath83 Posted November 1, 2013 Posted November 1, 2013 Not like Escher But that would be the top of interesting, of course. Actually, it's just a staircase that "builds itself" while you're walking it. Only 2 steps exist in the staircase. So I was thinking that I would include it in a sort of puzzle, where the player needs to reach a level/platform high up that he can't reach. It doesn't go in circles, just straight forward. I've thought of a lot of things, but I can't think of a smart way to do it. Not unless you can move several entities with a single command either. I could make it the hard way, but it would have very low re-production value.Very nice idea... mmmm,.. well the more directly idea is not a move vector stair, but a stair maked by func_usable entities, when yu go into a step, yu go into a trigger that spawn the upper step and hide the lower step... lol, so can work a magic scale that appear \ disapperar only when yu pass.with scripting, wait and delay commad is possible to create a time \ appearing stair. For a moving magic scale... mmm, is little difficult, really , i cannot help because with the move command i am not much good. maybe i can suggst you to watch the script of the map of underwater city: the levels of water in this map go up and down, and up and down, like a tide.so yu can check how work the script the program the water movement and make something like that with ypur stair.http://jkhub.org/files/file/287-submerged-city/ see how work that. maybe can be useful to you. also, yu can check the trial of kyle katarn on yavin on jedi outcast map when he make the luke training ground. remember? there is a part of pushing woods for go down lower a rock pillar until the jair with saber reach the ground. the map of training ground of JO is full of puzzles and you can studu their script for see how they work, maybe yu can find some idea. Boothand likes this
Boothand Posted November 1, 2013 Author Posted November 1, 2013 The water map can't help me I'm afraid. The water going up and down is just a door, or similar with two positions.The func_usables could actually be a better alternative than scripting, since it's easier to make changes - thanks for the reminder! It could make it difficult to have many steps though, because of the entity limit (I don't remember the specifics here, but things could stop working if there are too many). But it's probably currently the best solution, until eventually math is possible in the scripting. Asgarath83 likes this
Asgarath83 Posted November 1, 2013 Posted November 1, 2013 The water map can't help me I'm afraid. The water going up and down is just a door, or similar with two positions.The func_usables could actually be a better alternative than scripting, since it's easier to make changes - thanks for the reminder! It could make it difficult to have many steps though, because of the entity limit (I don't remember the specifics here, but things could stop working if there are too many). But it's probably currently the best solution, until eventually math is possible in the scripting.well, i am very happy of get you some helps. When yu release the stair, share a video. I wanna see what you create.Mmmm, in a my map however, i was using a moving script for go lower the level of the lava in a room, i need to check my map.Ok i checked my icarus script is that: "Rekius take off the magic fire..." );sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/effects/air_burst.mp3" );remove ( "lavafirelight" );remove ( "lavafire" );wait ( 5000.000 );sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/effects/air_burst.mp3" );remove ( "flame" );remove ( "flamesound" );remove ( "firefirebig" );wait ( 5000.000 ); affect ( "lava", /*@AFFECT_TYPE*/ FLUSH ){ move ( $tag( "lava", ORIGIN)$, $tag( "ref_lava", ORIGIN)$, 10000.000 ); <---- here is what yu need!} use ( "lavadrain" );wait ( 10000.000 );remove ( "lava" ); <- the lava is an entity.remove ( "magmakill" );remove ( "lavadrain" );wait ( 150.000 );use ( "attivalavamelc" );use ( "lavamelcbody" ); My lava is a func door. here the parameter of lava entity:the script command to move the lava for reach the ref_Tag origin of ref_lava entity.Lava parameters.angle -2func_doorparm1 ref_lavascript_targetname lavatargetname lavaspeed 10Toggle entity! so the "lava" is a shader brush lava like a door that can be moved only when used by a script. toggle is the paramter for make that.so you pratically need to create a step of the stair, make it us a func_door, a ref tag for the position where moving the step.and a script with the command i show you for making the movement.the toggle option avoid of the step func door to move when player is near. so you avoid unwished movements.Here is it. (
Boothand Posted November 2, 2013 Author Posted November 2, 2013 I already know how to deal with tags and move brushes. My point was that if I did that, I would need very many tags and much work and time. The only thing I'm looking for in this thread now, is if it's possible to do relative movement. The next best solution is the func_usables. But it creates really really a lot of work, and huge scripts, and busy looking map files since I have to deal with very many tags/vectors. I'm currently using the "if parmX is X, on this and that step and trigger, move step and trigger to tag and set parmX to X". I would really like just a function...-
Asgarath83 Posted November 2, 2013 Posted November 2, 2013 I already know how to deal with tags and move brushes. My point was that if I did that, I would need very many tags and much work and time. The only thing I'm looking for in this thread now, is if it's possible to do relative movement. The next best solution is the func_usables.Relative.... mmmm, whell the unique idea i have for a relative position is to use If and else parameter of icarusbut yes, need a great amount of variables and the script shoid be really complex.should be something like.affect step1 if "step1" origin = \ not egual \ > \ < etc of "step2" origin -- the move parameter i get to you.
Boothand Posted November 2, 2013 Author Posted November 2, 2013 It's a good thought, but - yes, you can move step1 to the origin of step2, but where you would move step2? As far as I know, there's not a way to move both of them with the same move command (and to an unset origin in this case). Asgarath83 likes this
Asgarath83 Posted November 2, 2013 Posted November 2, 2013 every step need a script_Targetname entry.affect step 1if Blablabla Move blablablabla to step 2 origin.affect step 2if blablablalbla move to step 3 origin ...etc etc. yu need to use signal " " waitsignal" " or dowait, for avoid the steps move together. example. affect step1if blablalba move blablabla to step 2 originl signal Step2go (into if parameter) affect step 2waitsignal step2go (so when movement of step 1 is ended start this part of the script) if blablablablabla move to spep 3 origin,.etc etc. So, this can function for every step. and a step move onluy when previous step has finished his move.
Boothand Posted November 3, 2013 Author Posted November 3, 2013 But, that provides all those steps are actually there Might as well use func_usables. Step3-4-5-6-7-8-xxxx. This is unnecessary to script compared to the usables. My steps appear instantly (no visible movement). I'm looking for something like a mathematical function designed for two steps. If not, I'd go with the usables.
Asgarath83 Posted November 3, 2013 Posted November 3, 2013 But, that provides all those steps are actually there Might as well use func_usables. Step3-4-5-6-7-8-xxxx. This is unnecessary to script compared to the usables. My steps appear instantly (no visible movement). I'm looking for something like a mathematical function designed for two steps. If not, I'd go with the usables.Ah, so, is a magical stair that appear instantly, but the step appear every time in a different place, or they appear at some distance by the first step. so every time the stair has a randomly configuration? yu want to make that?Well, i never tried to do a similar thing.but i suppose you can use a script that tell at startt of level of delcair some variables and set name or count for variables.when the step appear, yu can do:use step 1when use the step and step become visible"affect step" 1 set "variable step2" +1if "variable step2" +1 affect step 2 : SET_ORIGINn to (tag position or coordinates)else affect step2 SET ORIGIN TO...((so can appear randomly in two places.)you can work with declair, set variables +1 -1 etc etrc, yu can see how work these variables into the scripts of level t1_danger about the part of ship to collect for repeair the transport and Flee by Blenjeel.yu can set variabled that add or subcract point, and at second ov value the step of stair appear here, or there or in another place, with a complex mathematical game. every step can add values to other steps and subctract to other again.So you can obtain a very foolish randomize stair that appear, disappear every time with a strange configuration of the steps.LOL
Boothand Posted November 3, 2013 Author Posted November 3, 2013 Ah, so, is a magical stair that appear instantly, but the step appear every time in a different place, or they appear at some distance by the first step. so every time the stair has a randomly configuration? yu want to make that? I don't know where you got all these ideas from - no. I don't want to make anything randomized or appearing away from each other. All I'm interested in, in this thread, is finding a way to do math in Behaved. I want a script to get an entity's origin. Then take that origin and do for example "+ 0 30 30". What this means: You could make a brush and a trigger. Everytime you press the trigger, the brush moves 30 units on the Y axis and the Z axis (0 30 30). So, in theory, you could press that trigger forever, and it would move everytime. You could use two steps to make a stairway to the sky, if you wanted. I'm not talking about adding steps either. Only moving the brushes that I have. Another example of usage for this method: You could have a floating platform that would go wherever you wanted. Pressing the trigger would loop an offset on the X axis. So you would constantly be moving in one direction. The next time you press the trigger, it offsets on the Y axis. Please don't give suggestions on how to do this now - this is not something I want to make. Again, all I'm interested in, is getting a vector, and adding values to the vector. You mention something about "+1" here. Try to explain in a simple manner what you mean here. And how would you do + in Behaved?
Asgarath83 Posted November 3, 2013 Posted November 3, 2013 Ok ok t1_danger edited script of my mod:piece_pickupGenerated by BehavEdrem ( "Picked up one of the ship pieces." );sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/interface/pickup_battery.md3" );wait ( 1000.000 );declare ( /*@DECLARE_TYPE*/ FLOAT, "num" );set ( "num", $get( FLOAT, "SET_PARM1")$ );affect ( "player", /*@AFFECT_TYPE*/ FLUSH ){ set ( /*@SET_TYPES*/ "SET_COUNT", $get( FLOAT, "num")$ ); if ( $get( FLOAT, "num")$, $=$, $1$ ) { use ( "piece2_deactivate" ); use ( "piece3_deactivate" ); use ( "piece4_deactivate" ); use ( "activate_return1" ); task ( "earthdiag" ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak010.mp3" ); } dowait ( "earthdiag" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCE_PROTECT_FAST" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/earth_Reaver/earthreaver1.mp3" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.600 0.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "0" ); set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_GRAVITY", 1200.000 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "1" ); } if ( $get( FLOAT, "num")$, $=$, $2$ ) { use ( "piece1_deactivate" ); use ( "piece3_deactivate" ); use ( "piece4_deactivate" ); use ( "activate_return2" ); task ( "firediag" ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak011.mp3" ); } dowait ( "firediag" ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/fire_Reaver/firereaver1.mp3" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCE_RAGE" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.700 0.500 0.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_FORCE_RAGE_LEVEL", /*@FORCE_LEVELS*/ "3" ); set ( /*@SET_TYPES*/ "SET_FORCE_LIGHTNING_LEVEL", /*@FORCE_LEVELS*/ "3" ); } if ( $get( FLOAT, "num")$, $=$, $3$ ) { use ( "piece1_deactivate" ); use ( "piece2_deactivate" ); use ( "piece4_deactivate" ); use ( "activate_return3" ); task ( "airdiag" ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak012.mp3" ); wait ( 7000.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/chars/sand_creature/comment6.mp3" ); } dowait ( "airdiag" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_ALORA_SPIN_THROW" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/air_Reaver/airreaver1.mp3" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 1.000 1.000 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "3" ); set ( /*@SET_TYPES*/ "SET_GRAVITY", 450.000 ); } if ( $get( FLOAT, "num")$, $=$, $4$ ) { use ( "piece1_deactivate" ); use ( "piece2_deactivate" ); use ( "piece3_deactivate" ); use ( "activate_return4" ); task ( "waterdiag" ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak008.mp3" ); } dowait ( "waterdiag" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCE_ABSORB" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/water_Reaver/waterreaver1.mp3" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_HEALTH", 100 ); set ( /*@SET_TYPES*/ "SET_ARMOR", 100 ); set ( /*@SET_TYPES*/ "SET_FORCE_HEAL_LEVEL", /*@FORCE_LEVELS*/ "3" ); PIece returned script. //Generated by BehavEdrem ( "Picked up one of the ship pieces." );rem ( "The first item." );if ( $get( FLOAT, "SET_COUNT")$, $=$, $1$ ){ set ( /*@SET_TYPES*/ "SET_COUNT", 0 ); use ( "piece1_ship_fake" ); use ( "piece1_ship_real" ); use ( "piece2_activate" ); use ( "piece3_activate" ); use ( "piece4_activate" ); set ( "fPiecesPlaced", "+1" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ1" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/movers/objects/place_object" ); wait ( 1500.000 ); affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_ALORA_SPIN_THROW" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/force/speed.mp3" ); set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 1.000 1.000 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_GRAVITY", 800.000 ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "2" ); use ( "checkpoint" ); if ( $get( FLOAT, "fPiecesPlaced")$, $=$, $4$ ) { task ( "end1" ) { rem ( "Have they returned all pieces?" ); wait ( 1000.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak024.mp3" ); wait ( 5000.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/chars/sand_creature/commentvictory.mp3" ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_PROTECT_LEVEL", /*@FORCE_LEVELS*/ "3" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ5" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 2000 ); wait ( 2500.000 ); use ( "end_level" ); } do ( "end1" ); } }}rem ( "The second item." );if ( $get( FLOAT, "SET_COUNT")$, $=$, $2$ ){ set ( /*@SET_TYPES*/ "SET_COUNT", 0 ); use ( "piece2_ship_fake" ); use ( "piece2_ship_real" ); use ( "piece1_activate" ); use ( "piece3_activate" ); use ( "piece4_activate" ); set ( "fPiecesPlaced", "+1" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ2" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/movers/objects/place_object" ); wait ( 1500.000 ); affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { wait ( 1000.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/force/absorb.mp3" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCE_ABSORB" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_FORCE_RAGE_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_FORCE_LIGHTNING_LEVEL", /*@FORCE_LEVELS*/ "1" ); use ( "checkpoint" ); if ( $get( FLOAT, "fPiecesPlaced")$, $=$, $4$ ) { do ( "end2" ); task ( "end2" ) { rem ( "Have they returned all pieces?" ); wait ( 1000.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak024.mp3" ); wait ( 5000.000 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_RAGE_LEVEL", /*@FORCE_LEVELS*/ "3" ); set ( /*@SET_TYPES*/ "SET_FORCE_LIGHTNING_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_COUNT", $get( FLOAT, "cure")$ ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/chars/sand_creature/commentvictory.mp3" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ5" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 2000 ); wait ( 2500.000 ); use ( "end_level" ); } } }}rem ( "The third item." );if ( $get( FLOAT, "SET_COUNT")$, $=$, $3$ ){ set ( /*@SET_TYPES*/ "SET_COUNT", 0 ); use ( "piece3_ship_fake" ); use ( "piece3_ship_real" ); use ( "piece1_activate" ); use ( "piece2_activate" ); use ( "piece4_activate" ); set ( "fPiecesPlaced", "+1" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ3" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/movers/objects/place_object" ); wait ( 1500.000 ); affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCE_PROTECT" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/force/downpower.mp3" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 0.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_GRAVITY", 800.000 ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "2" ); use ( "checkpoint" ); if ( $get( FLOAT, "fPiecesPlaced")$, $=$, $4$ ) { do ( "end3" ); task ( "end3" ) { rem ( "Have they returned all pieces?" ); wait ( 1000.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak024.mp3" ); wait ( 5000.000 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_GRAVITY", 750.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/chars/sand_creature/commentvictory.mp3" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ5" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 2000 ); wait ( 2500.000 ); use ( "end_level" ); } } }}rem ( "The fourth item." );if ( $get( FLOAT, "SET_COUNT")$, $=$, $4$ ){ set ( /*@SET_TYPES*/ "SET_COUNT", 0 ); use ( "piece4_ship_fake" ); use ( "piece4_ship_real" ); use ( "piece1_activate" ); use ( "piece2_activate" ); use ( "piece3_activate" ); set ( "fPiecesPlaced", "+1" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ4" ); sound ( /*@CHANNELS*/ CHAN_AUTO, "sound/movers/objects/place_object" ); wait ( 1500.000 ); affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCE_RAGE" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/weapons/force/rage.mp3" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.700 0.500 0.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_FORCE_HEAL_LEVEL", /*@FORCE_LEVELS*/ "1" ); wait ( 1000.000 ); use ( "checkpoint" ); if ( $get( FLOAT, "fPiecesPlaced")$, $=$, $4$ ) { do ( "end4" ); task ( "end4" ) { rem ( "Have they returned all pieces?" ); wait ( 1000.000 ); sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/chars/jaden_male/06jak024.mp3" ); wait ( 5000.000 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "2" ); set ( /*@SET_TYPES*/ "SET_FORCE_HEAL_LEVEL", /*@FORCE_LEVELS*/ "3" ); sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/chars/sand_creature/commentvictory.mp3" ); set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SUCCEEDED", /*@OBJECTIVES*/ "T1_DANGER_OBJ5" ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 1.000, 2000 ); wait ( 2500.000 ); use ( "end_level" ); } } } those are variables script. I create a similar script in my tomb_Spedtral map: there is a wraith inside a room with a barrier. the deadly fog barrier go down when the wraith devour the total amount of 5 soul wandering into the chamber.here's how work my script. Intro script cinematic//Generated by BehavEdrem ( "Video introduttivo" );camera ( /*@CAMERA_COMMANDS*/ ENABLE );camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam1", ORIGIN)$, 0 );camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam1", ANGLES)$, < 0.000 0.000 0.000 >, 0 );camera ( /*@CAMERA_COMMANDS*/ ZOOM, 60.000, 3000 );wait ( 3000.000 );camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.100 0.025 0.100 >, 1.000, 2000 );wait ( 2000.000 );camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 );sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/chars/shadowtrooper/decloak.wav" );use ( "fakereaver" );remove ( "soulsound" );remove ( "deadsteam" );waitsignal ( "resurrect" );camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam2", ORIGIN)$, 0 );camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam2", ANGLES)$, < 0.000 0.000 0.000 >, 0 );camera ( /*@CAMERA_COMMANDS*/ ZOOM, 80.000, 0 );wait ( 100.000 );camera ( /*@CAMERA_COMMANDS*/ ZOOM, 50.000, 6000 );wait ( 6000.000 );camera ( /*@CAMERA_COMMANDS*/ DISABLE );remove ( "fakereaver" );set ( /*@SET_TYPES*/ "SET_OBJECTIVE_SHOW", /*@OBJECTIVES*/ "T3_RIFT_OBJ1" );-----------------------------------------------------------------declare ( /*@DECLARE_TYPE*/ FLOAT, "SoulEated" ); <--- LOOK that's command.set ( "SoulEated", "0" ); <--- LOOK that's comamnd------------------------------------------------------------------------- This is the souleated script. every soul that the player devour (there is a fx of the soul, a trigger that need to be activate by player. activating the trigger, the fx is switched to off and run the scriptrunner. all scriptrunner run the same script.the script every time add +1 at value of variable SoulEated, there is 0 by default.when value is 1 happen a thing, when is due, happen another things etc etc. the first 2 soul, not matter what specific soul are devouried, just devour a generic soul, give to the player 20 health point and add the force jump level 1 . the third add a force push level 1, the five is sufficient for restoree all HP. player can manifest the symbiotic weapon an modded saber maked for do a spectral reaver, necessary for kill monsters in the realm of the deads, and the barrier that trap player into the room go down. //Generated by BehavEdrem ( "divorata una specifica anima..." );set ( "SoulEated", "+1" );rem ( "divorata una delle 5 anime a random" );rem ( "la prima anima" );if ( $get( FLOAT, "SoulEated")$, $=$, $1$ ){ affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/weapons/force/heal1_m.mp3" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCEHEAL_START" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_HEALTH", 20 ); set ( /*@SET_TYPES*/ "SET_ARMOR", 0 ); }}rem ( "la seconda anima" );if ( $get( FLOAT, "SoulEated")$, $=$, $2$ ){ affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/weapons/force/heal1_m.mp3" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCEHEAL_START" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_HEALTH", 40 ); set ( /*@SET_TYPES*/ "SET_ARMOR", 10 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "1" ); }}rem ( "la terza anima" );if ( $get( FLOAT, "SoulEated")$, $=$, $3$ ){ affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/weapons/force/heal3_m.mp3" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCEHEAL_START" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_HEALTH", 60 ); set ( /*@SET_TYPES*/ "SET_ARMOR", 30 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_FORCE_PUSH_LEVEL", /*@FORCE_LEVELS*/ "1" ); }}rem ( "la quarta anima" );if ( $get( FLOAT, "SoulEated")$, $=$, $4$ ){ affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/weapons/force/heal4_m.mp3" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCEHEAL_START" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_HEALTH", 80 ); set ( /*@SET_TYPES*/ "SET_ARMOR", 60 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_FORCE_PUSH_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "1" ); }}rem ( "la quinta anima" );if ( $get( FLOAT, "SoulEated")$, $=$, $5$ ){ affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); sound ( /*@CHANNELS*/ CHAN_VOICE, "sound/weapons/force/heal.mp3" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_FORCEHEAL_START" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.500 1.000 >, 1.000, 2000 ); wait ( 2000.000 ); camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_HEALTH", 100 ); set ( /*@SET_TYPES*/ "SET_ARMOR", 100 ); set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_FORCE_PUSH_LEVEL", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "1" ); set ( /*@SET_TYPES*/ "SET_SABER_OFFENSE", /*@FORCE_LEVELS*/ "1" ); }}that's answer for +1 question.for the rest, i not use never the Move command function for do a math combination, sorry, and i am not sure that this can work.but i understand now. yu want a triggerthat move your step of stair scale by a vector axis.but when player leave the trigger or not take active it, yu want that step stop its movement. .mmm, i cannot answer for that because i never tried to do that think, so at this point i can only pass the problem to some other that answering you.in a my map, i was did a func_train entity that movement following a path with a series of path_corner entity link one to the other in a spilral that lead up in a pit for ascending it.but that's not what you need. //Generated by BehavEdhere are the possible combination of move command on Icarus.//Generated by BehavEd for move by origin of an entity to origin of another entity that's the command:{ move ( $tag( "lava", ORIGIN)$, $tag( "ref_lava", ORIGIN)$, 10000.000 ); <---- here is what yu need!}but this is NOT what you need.You need somelike THAT:move ( $get( VECTOR, "SET_PARM1")$, $get( VECTOR, "SET_PARM1")$, 1000.000 );that, i am never setted or used. i am very apologyze. so i cannot help you. I not know exactly how work that's function of it's possible to add variables. I leave the trouble to someone more expert of me on that.
Solution MoonDog Posted November 3, 2013 Solution Posted November 3, 2013 Put a huge wall of copy pasted text in a spoiler, or link it to a pastebin. If you are worried about the entity limit, its 1021+1 for the worldspawn. (I think) As for what you require from Icarus, it's not exactly possible. If there were callbacks to retrieve each axis individually, then maybe. At that point you could store each origin value in a parameter on the entities and then do a simple math on that value. After that you'd need callbacks that could then input those parameters back into an X Y Z format and then move the entities that way. Of course, if this were better scripting, (Lets say, CODSCRIPT) you could store the initial value of the origin, make it into an array and call a function to increase each axis by a set amount and store the sum in an element of the array, which could be called upon by a different custom move function. But alas, you are stuck in the past. Boothand likes this
eezstreet Posted November 3, 2013 Posted November 3, 2013 worldspawn is not considered an entity. Entity limit is 1024 - MAX_CLIENTS*2 - slack space for temporary entities, so around ~800-~900. Boothand likes this
Boothand Posted November 3, 2013 Author Posted November 3, 2013 Asgarath, I know you're trying to be helpful, but a few things to consider: There is no way I can relate to a script that takes 20 minutes to read, which has something to do with the +1 command, which I requested a simple explanation for (read: Veeeeery small portion of a script. One or two sentences summary) - which in turn, turned out to not have a clear relation to what I was trying to achieve, which you said aaaafter the wall of code I appreciate your effort to help, but maybe hold yourself a bit more back when you're aware that you don't have a solution. Way too much information. I do think I get what the +1 thing is though. But let's not talk more about the +1 deal. @, thanks for the insight!
Asgarath83 Posted November 3, 2013 Posted November 3, 2013 Yes, my english is not perfect, so i not understand much fast what you wanna do exactly with icarus, i understood another things.but the Move command with vector... boh, i not think can support the comamnd of +1 or -1, but i not know because i never used much as command. i use principally affect, set, signal, waitsignal, and dowait.and sometime the variablesfor the variables is not complicated.A: at the start of level yu need to include in the intro script the creation of variables.that's look like thisdeclare ( /*@DECLARE_TYPE*/ FLOAT, "variablename" ); <- this command declaire the name of variableset ( "variablename", "0" ); <--- this command assign to a variable name a numeric value. Pratically thesere are useful when yu need to use events that need to be counted for happening.for example: take some number of items for obtain something. yes, yu can do that also with target_counter but if yu need that at 1things happen a thing, at the second another again, at the ether once different more, the target counter is not the more good way.the more good way is to use the variables. after definied name of variable and value of that at intro of level,you can define a script used by a trigger, that add to the variable a numeric value.set ( "variable", "+1" );this command, do that.for execute command at second of variable value, the sintax is:if ( $get( FLOAT, "variablename")$, $=$, $1$ ){ Other istructions. it's all here. yu can also specify not only $=$ but < > and or not egual. for the +1 i mean that. is the set of function of icarus i know that allow to add variables numeric math value.but yu need something like that for the Move command vector assist.as told Polarity, using a variable in a move script is very odd and hard thing to do. O.o.Well , i am done the possible here. I leave to your discussion. I hope you can found a solution. See ya.And sorry, because i failed to help you. i am very apologyze. Boothand likes this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now