Langerd Posted January 4, 2016 Share Posted January 4, 2016 Is there any chance to create npc with something like this:You attack the npcWhen his health will be half way down his player model (npc change)I want to make the little Boss battle where we are fighting againts the sword user but after half of his hp will go down i want to make him use the blaster or something (BUT! I need a diffrent npc class here )Any ideas? Link to comment
mrwonko Posted January 4, 2016 Share Posted January 4, 2016 You'll want painscript, not fleescript; you can check HP in there and then spawn a new npc if it's below the threshold. Maybe show a cutscene to mask the exchange and make it clear. Asgarath83 and Langerd like this Link to comment
Asgarath83 Posted January 5, 2016 Share Posted January 5, 2016 there is also another way. you can set on spawnscript the boss as SET_UNDYING, true.and to deathscript it will not die.when it get 1 HP of health, you can activate the script that change his model to another model with SET_PLAYERMODELcommand.otherwise, you can use a cinematic for removing the boss with remove command and with use command spawn an hidden passive invisibile not solid boss for the round 2. Langerd likes this Link to comment
Ramikad Posted January 5, 2016 Share Posted January 5, 2016 I suggest both of the above. A painscript that runs a check on the NPC's health and then sets it to a new NPC (SET_PLAYERMODEL) when the health is halved. Langerd likes this Link to comment
Langerd Posted January 5, 2016 Author Share Posted January 5, 2016 Well i made the npc_spawner in gtkradiant , gave it a fleescript (i want to make this after half of health) and gave the script that goes like this://Generated by BehavEd set ( /*@SET_TYPES*/ "SET_PLAYERMODEL", "rederwings" ); But after dealing dmg to the enemy and when his health goes lower than half the error shows up :/ :Sv_getUserinfo : bad index 47How to make it work? Maybe set_playermodel works only on the Player :/ Link to comment
Langerd Posted January 5, 2016 Author Share Posted January 5, 2016 (edited) And well i dont want to make it as the cutscene because i want to make this effect on the common enemies too. Maybe it bug the game because it would change npc using the saber to the npc with gun :/ and other class...I dont want to use the codes... too much to learn.Hmm i was thinking about one thing too. Is it possible to make npc 1. spawn in the origin of other npc 2. but after the 2. npc will die?Edit:In the icarius manual i found some interesting option :SET_ORIGIN ”x y z” Sets origin of current entity – in Q3Radiant map coords.SET_COPYORIGIN targetname Copies an origin from entity with given targetname tocurrent entity. <- This one. Question here. The origin of the npc spawner in gtk is origin of the spawner? Or of the npc? If it is origin of the npc would this option follow him? Edited January 5, 2016 by Langerd Link to comment
Asgarath83 Posted January 6, 2016 Share Posted January 6, 2016 Mmm i think that you can make an NPC invincible, invisible, not solid passive.and you can make a fleescript that affected the invisibile NPC to SET origin of the NPC that run the fleescript.is possible with helper and tag function of the icarus advanced setting of the SET_ORIGIN command. you can give to an entity the angles, and the origin of another entity. i tryed this into a cinematic for teleport an NPC into a navgoal origin and it works. )for remove the old enemy you can useremove (targetname).this remove the entity it self, the model, all physical modelif you use kill, instead, enemy die.XDuse remove and an entity will be removed and disapperead.remember,:you cannot more use a removed entity with scripts, or into the game. Link to comment
Langerd Posted January 6, 2016 Author Share Posted January 6, 2016 Mmm i think that you can make an NPC invincible, invisible, not solid passive.and you can make a fleescript that affected the invisibile NPC to SET origin of the NPC that run the fleescript.is possible with helper and tag function of the icarus advanced setting of the SET_ORIGIN command. you can give to an entity the angles, and the origin of another entity. i tryed this into a cinematic for teleport an NPC into a navgoal origin and it works. )for remove the old enemy you can useremove (targetname).this remove the entity it self, the model, all physical modelif you use kill, instead, enemy die.XDuse remove and an entity will be removed and disapperead.remember,:you cannot more use a removed entity with scripts, or into the game.But it will only work when the npc is standing :S I wanted to make this change immediately after death of the reborn (Well i am trying with reborns for testing) BUT The npc will not be static but running,fightning etc SO it wont be standing in one place.I thought that the origin of the npc is changing with the movment of it XS There is srsly no script to change the npc ? Of course changing the boss npc with cutscene (would create great atmosphere yep and would help players to know what is going on) But i wanted to make this effect for my angels in my morin mod (They would fight with You with sword and after half health he would change to the floating angel npc with rockettrooper class) and they are common-harder enemies but not enough important to make them using the cutscene :S I also made the angel priest and they are using the sith scepter (but i will change model of it and look of the effects) and they have special ability because of that. With normal angels i wanted to create this little change too and i thought it is one easy script ... but.. nope :S Edit: Found this site https://github.com/JACoders/OpenJK/wiki/ICARUS-ScriptingIt can help a lot Link to comment
Langerd Posted January 6, 2016 Author Share Posted January 6, 2016 Well ... SET_COPYORIGIN doesnt work when You try to copy the origin from the other npc :/ I tried it with npc_targetname and even targetname Link to comment
Asgarath83 Posted January 6, 2016 Share Posted January 6, 2016 mmmm try this alternative method.1: you need to put into the map an ENTITY for every version of a NPC.so if a NPC is "angela" and at half life it transform into "angelb" put into map angela and angelb entity.you need to give a different NPC_targetname to EVERY angels into a battle field.you need to place all B version of the enemy of the map inside an hidden closed squared room that player cannot reach in any way.this is like a repository of entities.every enemy A get a fleescript.every fleescript contain just two command._use "evilangelb"use "transformefx"affect "transformefx" set ( /*@SET_TYPES*/ "SET_ORIGIN", $tag( "EvilAngelA", ORIGIN)$ ); set ( /*@SET_TYPES*/ "SET_ANGLES", $tag( "EvilangelA", ANGLES)$ );wait 100remove "evilangela" so, when a enemy run his fleescript, he remove itself, and spawn the overpower version of itself.why transfom effect? transform effect should be a particellar efx that you can create for hide the removing of OLD NPC and placing of the new. and fx_runner with the script_targetname key transformefx should be played with this script at the same origin and angles of Npc is disapperaing. so the magical cloud hide his disapperaring, that should be not much goot to see.Now we need to make a spawnscript for the evilangelBthe spawnscript of evilangelB is runned when evilangelB is used.It contain these istruction:set ( /*@SET_TYPES*/ "SET_ORIGIN", $tag( "EvilAngelA", ORIGIN)$ ); set ( /*@SET_TYPES*/ "SET_ANGLES", $tag( "EvilangelA", ANGLES)$ ); So evilangelB will be placed into the same origin and angles of evilangelA. i hope it works. i never tried something like that, but i see there is in the Escape of yavin 4 mod the lost map, inside the final battle, that is possible to spawn an entity into a specifical location with an fx_runner that spawn itself. OTHERWISE if this not work, you can place into the area of fighting invisible not solid NPC with the version B of the angel nd when an angel is to fleescript, it remove itself and spawn the version 2 with a spectacular fx effect or a specific animation. (maybe you can set in invincible mod or undying the npc, and also in cinematic state, and he can use the BOTH_RAGE animation of level 1 rage and disapperaing into some clouding efx and so he teleport istantly heself into spawn location of enemy B, that spawn the B winged version with rockettrooper class. Link to comment
Langerd Posted January 6, 2016 Author Share Posted January 6, 2016 mmmm try this alternative method.1: you need to put into the map an ENTITY for every version of a NPC.so if a NPC is "angela" and at half life it transform into "angelb" put into map angela and angelb entity.you need to give a different NPC_targetname to EVERY angels into a battle field.you need to place all B version of the enemy of the map inside an hidden closed squared room that player cannot reach in any way.this is like a repository of entities.every enemy A get a fleescript.every fleescript contain just two command._use "evilangelb"use "transformefx"affect "transformefx" set ( /*@SET_TYPES*/ "SET_ORIGIN", $tag( "EvilAngelA", ORIGIN)$ ); set ( /*@SET_TYPES*/ "SET_ANGLES", $tag( "EvilangelA", ANGLES)$ );wait 100remove "evilangela" so, when a enemy run his fleescript, he remove itself, and spawn the overpower version of itself.why transfom effect? transform effect should be a particellar efx that you can create for hide the removing of OLD NPC and placing of the new. and fx_runner with the script_targetname key transformefx should be played with this script at the same origin and angles of Npc is disapperaing. so the magical cloud hide his disapperaring, that should be not much goot to see.Now we need to make a spawnscript for the evilangelBthe spawnscript of evilangelB is runned when evilangelB is used.It contain these istruction:set ( /*@SET_TYPES*/ "SET_ORIGIN", $tag( "EvilAngelA", ORIGIN)$ ); set ( /*@SET_TYPES*/ "SET_ANGLES", $tag( "EvilangelA", ANGLES)$ ); So evilangelB will be placed into the same origin and angles of evilangelA. i hope it works. i never tried something like that, but i see there is in the Escape of yavin 4 mod the lost map, inside the final battle, that is possible to spawn an entity into a specifical location with an fx_runner that spawn itself. OTHERWISE if this not work, you can place into the area of fighting invisible not solid NPC with the version B of the angel nd when an angel is to fleescript, it remove itself and spawn the version 2 with a spectacular fx effect or a specific animation. (maybe you can set in invincible mod or undying the npc, and also in cinematic state, and he can use the BOTH_RAGE animation of level 1 rage and disapperaing into some clouding efx and so he teleport istantly heself into spawn location of enemy B, that spawn the B winged version with rockettrooper class.Thanks for answer.. It sadly doesnt work .. and the effect doesnt follow the npc :/ It explode in the normal origin.. Hmm.. Should i remove the origin in gtkradiant from npc and effect? Link to comment
Asgarath83 Posted January 6, 2016 Share Posted January 6, 2016 Thanks for answer.. It sadly doesnt work .. and the effect doesnt follow the npc :/ It explode in the normal origin.. Hmm.. Should i remove the origin in gtkradiant from npc and effect? The fx_runner not follow the NPC? damn >.<i start to think that these think require some kind of code hacking.the unique thing i can tell you is of make something like on escape of yavin 4 final battl.eyou remove the NPC with fleescript and spawn the B version in another point with an FX_runner that run into some time.Maybe you can use some kind of camera fade for hide the removing and a sound of a magic. i not know if there are other solutions. Link to comment
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