Asgarath83 Posted June 28, 2018 Posted June 28, 2018 i am trying to force with icarus a flying NPC and player to move ever forward for my fighters mod withou coding. i see there is a script command that can force an entity to run or to turn around.SET_FORWARDMOVE. if you set +127 on spawnscript, on NPC or player, it move EVER forward. EVER! EVER at his runspeed! it's perfect! at this poind need just to be joined with SET_RUNNING \ SET_WALKING and SET_WALKSPEED \ SET_RUNSPEED.SET_FORWARDMOVE -127 force entity to move backward.SET_RIGHTMOVE with + or - 127 force entity to move turn ever right or left. (so is possible to create a rotating twisting NPC, cool! ) my question is that: i tested as spawnscript on two enemies and on player, on player it works perfects.on NPC enemies it doesnt' work. what i need to do? i need to set as an affect command?@@Noodle Noodle likes this
Asgarath83 Posted July 2, 2018 Author Posted July 2, 2018 Might want to move this to Modding Assistance Well, is a code \ script request so sections should be fine... maybe the coding and script forum has not much peoples watching in this time, specially in summers holiday. i want just clarification about this icarus command and if works only on players or also on npc too. if do like icarus description promising, i failed to trigger up. or i wrote the script into the wrong way.
Noodle Posted July 3, 2018 Posted July 3, 2018 Did you try to set it as an 'affect' command? I'm actually surprised it worked on a player but not an NPC. Could you share the scripts here?
Asgarath83 Posted July 4, 2018 Author Posted July 4, 2018 Did you try to set it as an 'affect' command? I'm actually surprised it worked on a player but not an NPC. Could you share the scripts here?well i also changed NPC ai to stormtrooper and also playermodels too for allow them to behave like stormtroopers and not experimental fighters.however this is how is set on map:info player start has as target "tf" entitiesentities with targetname tf are the not moving fighters they are these map settingsangle -90NPC_spawnerNPC_type TieFighter1count -1spawnscript fighters/spawnfighter2targetname tf the script is that: //Generated by BehavEd rem ( "Fighter enemy no gravity costant move forward!" ); set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 ); set ( /*@SET_TYPES*/ "SET_WEAPON", /*@[member='weaponx']_NAMES*/ "WP_BLASTER" ); affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 ); } so... i need also to put a scriptrunner triggered by info_player_startand a NPC_targetname to fighers entity and a script that tellaffect (figher1)set move forward 127affect (fighter2)set move forward 127? i can try.mainly when a entity have a spawnscript\fleescript\deathscript etc read the setting behavours without affecting functions, simply putting command on script main field. ... but icarus is strange some time...okay now i try with affectings tecnique.
Asgarath83 Posted July 4, 2018 Author Posted July 4, 2018 Okay... i see there was two npc files and one overwrite the other i was use for testing... damn >.< removed.this is the NPC file of the Custom NPC TieFighter1 // Test AI FOR AUTOMOVEFORWARD WORK IN PROGRESS... { playerModel stormtrooper weapon WP_BLASTER weapon WP_ROCKET_LAUNCHER weapon WP_REPEATER weapon WP_FLECHETTE FP_HEAL 0 FP_LEVITATION 0 FP_SPEED 0 FP_PUSH 0 FP_PULL 0 FP_TELEPATHY 0 FP_GRIP 0 FP_LIGHTNING 0 FP_RAGE 0 FP_PROTECT 0 FP_ABSORB 0 FP_DRAIN 0 FP_SEE 0 FP_SABERTHROW 0 FP_SABER_DEFENSE 0 FP_SABER_OFFENSE 0 FP_STUN 0 FP_HATE 0 FP_HEALOTHER 0 FP_CONTROLMIND 0 FP_WRACK 0 FP_FREEZE 0 FP_FORCEGLYPH 0 FP_STONEGLYPH 0 FP_FIREGLYPH 0 FP_WATERGLYPH 0 FP_DARKGLYPH 0 FP_WINDGLYPH 0 FP_SUNGLYPH 0 FP_HOLYGLYPH 0 FP_NECROGLYPH 0 FP_SOUNDGLYPH 0 forceRegenAmount 0 forcePowerMax 0 rank captain aggression 5 aim 5 intelligence 5 reactions 5 move 5 evasion 5 playerTeam TEAM_ENEMY enemyTeam TEAM_PLAYER class CLASS_WEEQUAY health 1000 snd tie-fighter sndcombat tie-fighter sndextra tie-fighter sndjedi tie-fighter dismemberProbArms 0 dismemberProbHands 0 dismemberProbHead 0 dismemberProbLegs 0 dismemberProbWaist 0 yawSpeed 150 walkSpeed 500 runSpeed 1000 } i added also on ground of level a simple waypoint grid, just to be sure, because shooter npcs are dumbs and without navgrid they not want to move... but result are the same. the two npcs are in idle state at start level. player automoveforward, they not. when they see the player, they not move and chase and they stay on position and they shoot with alt fire blaster ... (but i never put SET_ALT_FIRE true)now the scripts are in that way:player spawn script: (fired with trigger_once linket to a target_scriptrunner no "run on activator" spawnflag. i tryed this spawnflag and not work) without run on activator work but ONLY on player//Generated by BehavEdrem ( "Player costantly move forward" );use ( "tf" );wait ( 1000.000 );set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 );set ( /*@SET_TYPES*/ "SET_GRAVITY", 0.000 );affect ( "fighter1", /*@AFFECT_TYPE*/ FLUSH ){ set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 ); set ( /*@SET_TYPES*/ "SET_WEAPON", /*@@weaponx_NAMES*/ "WP_BLASTER" ); set ( /*@SET_TYPES*/ "SET_ENEMY", "player" );}affect ( "fighter2", /*@AFFECT_TYPE*/ FLUSH ){ set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 ); set ( /*@SET_TYPES*/ "SET_WEAPON", /*@@weaponx_NAMES*/ "WP_BLASTER" ); set ( /*@SET_TYPES*/ "SET_ENEMY", "player" );} the two npc have these spawnscripts, too://Generated by BehavEdrem ( "Fighter enemy no gravity costant move forward!" );affect ( "player", /*@AFFECT_TYPE*/ FLUSH ){ set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 );}affect ( "fighter1", /*@AFFECT_TYPE*/ FLUSH ){ set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 );}affect ( "fighter2", /*@AFFECT_TYPE*/ FLUSH ){ set ( /*@SET_TYPES*/ "SET_FORWARDMOVE", 127 );}they not works and not affect no one.
Asgarath83 Posted July 4, 2018 Author Posted July 4, 2018 Interessing...D:https://github.com/JACoders/OpenJK/wiki/ICARUS-ScriptingSET_FORWARDMOVE int Speed to move current entity forward (use negative value to move backward). This is a relative speed, not actual, valid ranges are -127 to 127. 127 = use runSpeed, 64 = use walkSpeed, 0 = don't force any movement.SET_RIGHTMOVE int Speed to move current entity to the right (use negative value to move left). This is a relative speed, not actual, valid ranges are -127 to 127. 127 = use runSpeed, 64 = use walkSpeed, 0 = don't force any movement.
Asgarath83 Posted July 4, 2018 Author Posted July 4, 2018 Tested on Yavin2 map intro script, affecting kyle and rosh... not works. on player, instead, yes. Damn, this script command works only on player and not on NPCs? .-.
Noodle Posted July 4, 2018 Posted July 4, 2018 Do the NPCs have a proper NPC_targetname value? I'd advice you to create a trigger_once brush that targets a target_scriptrunner entity that uses your custom script. I've seen your method fail in the past for some reason.
Asgarath83 Posted July 4, 2018 Author Posted July 4, 2018 Do the NPCs have a proper NPC_targetname value? I'd advice you to create a trigger_once brush that targets a target_scriptrunner entity that uses your custom script. I've seen your method fail in the past for some reason.1: yep, NPCs have NPC_targetname and also script_targetname named respectevely fighter1 for first npc and fighter2 for second npc.2: trigger once around NPCs that fire script with scriptrunner on activator NPC itself or trigger once around infoplayerstart that run a start script that affect the two npcs and players too? i tryed the method of trigger_once and scriptrunner for 3 hours this morning in various combination but without results. Seems however that this command can be executed only by affect... but works onfly for player. pretty strange on icarus guide is defined as NPC command too. also icarus description talks about NPCs.
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