ExtraEntitiesMod
[u]Introduction[/u][br]
[br]
I will make a small mod to bring some extra entites to NS2, like a teleport-trigger, a drivable train etc. [br]
(the entites from hl1 that made you making some cool fun maps). I also included some npcs you can use for co-op maps etc.[br]
[br]
Mappers can use them then in their maps to create something different.[br]
The Mod will be called ExtraEntitesMod and if it's finished I will upload it to workshop.[br]
Will also include all the entites to the CombatMod.[br]
[br]
[u]Entities worked on[/u][br]
(look at the bottom at the post to see all entites, will only write here entities that i'm currently working on)[br]
• logic_power_point_listener (triggers when power in room changes)[br]
[br]
[u]Where can I get the mod?[/u][br]
[br]
If you want to get the mod, test the entities or use it on your mods (I will wrote a tutorial for that)[br]
you can download the mod "ExtraEntitiesMod" in the workshop, Id is "66f9c57"[br]
[br]
You can find the code here at GitHub:[br]
https://github.com/JimWest/ExtraEntitesMod[br]
[br]
[br]
[u]How to use the entities?[/u][br]
[br]
To select the entitys, you have to set a diferent game in the Launch-Pad. To do that, best is to download the mod (EEM) from GitHub directly into your Ns2 folder (steamapps\common\natural selection 2\ExtraEntitesMod). To Setup the launchpad, use my setup_launchpad.vbs.[br]
[br]
[br]
Only use one unique name for every entity, don't name 2 entities the same, this will cause some bugs cause the engine will only find one entity and the other will be ignored. You will need to set names to every entities that should get triggered by other entities (the engine will then find the entity inGame).[br]
[br]
_________________________________________________________[br]
Teleporters, trains etc:[br]
_________________________________________________________[br]
[br]
[u]Teleport-Trigger[/u][br]
• The cone will show you the direction of the teleporter output, it will rotate, too, when you rotate the whole trigger.[br]
• If its not only a exit (used in both directions), you need to set a name and a destination Name (name of the exit teleporter). Do the same for the 2nd teleporter (permute the names).[br]
• The wait delay in sec let the teleporter ignore the player for that time, till he will teleport him again (2 sec is a good value, you don't have to change it).[br]
• You can disable the trigger via trigger enabled - false, it will only teleport players when a logic entity (like a timer) triggered the teleporter.[br]
• You can set the teleporter to marine or alien team only, default is for both teams (not on the screen, option called Team Number).[br]
• Just ignore the Distance and Angles, thats just to show the cone in the Editor[br]
[br]
[u]Push_Trigger [/u][br]
• The cone will show you the direction of the pushforce. It will rotate, too, when you rotate the whole trigger.[br]
• You can set the Push force, but the default 30 is a good value to start testing.[br]
• You can disable the trigger via trigger enabled - false, it will only push players when a logic entity (like a timer) triggered the push_trigger.[br]
• Just ignore the Distance and Angles, thats just to show the cone in the Editor[br]
[br]
[u]Gravity_Trigger [/u][br]
• Lets you change the gravity inside this trigger for every player which is inside[br]
• You can set higher or lower gravity (0 will be no gravity, -50 higher etc., +10 would work a bit like a push trigger. Allowed are values form -100 to 100)[br]
[br]
[u]Func_Door [/u][br]
• Starts open let the door start unlocked (it will work like a normal door, but can be triggered and can be disabled)[br]
• Stay open lets the door stay open when unlocked, but will close when locked (but no open/close all the time)[br]
[br]
[u]Func_Moveable [/u][br]
• You can set any model you like (most models are invisible at the background, but you can just put the same model 180° rotate behind it and link them with the logic_multiplier)[br]
• You can scale the model as you like.[br]
• Place the model at its "finished" position, when you set Starts opened to false, it will start there in the game, too. If you let it true, the model will start above or under the vent so the vent is opened and will be closed after triggering.[br]
• Direction: currently you can only set Up, Down, Left, Right and a waypoint (use a train_waypoint for this)[br]
[br]
[u]Func_Platform[/u][br]
• Works like an elevator, needs 2 func_train_waypoints (start and end point)[br]
• You can use every model for this[br]
[br]
[u]Func_Train[/u][br]
• A drivable train, can turn every model to a train[br]
• Needs a name and refering func_train_waypoints to build a path (also add some numbers to the number entry of the waypoint, like 1 2 3 4 etc.)[br]
[br]
[u]Map_Settings[/u][br]
• Rise the view distance if you need to[br]
• you can set fall damage on or off (default off, Lerks, Skulks, JetpackMarines and Fades don't get fall damage)[br]
[br]
[u]Map_Change[/u][br]
• Lets you change the map to a specific map after getting triggered (OH yeah this is working!)[br]
[br]
[br]
_________________________________________________________[br]
Now the Logic entities:[br]
_________________________________________________________[br]
[br]
Most logic entities have only one output, but you can use the logic_mutliplier to trigger as many things as you like (for example the timer triggers a multiplier and that triggers 10 doors, or 9 doors, 1 multiplier which then triggers again another entities).[br]
[br]
[u]Logic_Breakble[/u][br]
• Destroyable Model, will play a cinematic if distroyed[br]
• You can set Health, material etc[br]
[br]
[u]Logic_Button[/u][br]
• Pushable Model (you can set every model to it), will trigger when getting pressed.[br]
• You can set CooldownTime, the team which can trigger it, the amount (once per player, all the time etc.)[br]
[br]
[u]Logic_Cinematic[/u][br]
• Let's you play a Cinematic with all logic entities[br]
• NEW: if you have a camera in your cinematic, this will set to every player so its like a cutscene[br]
[br]
[u]Logic_Counter [/u][br]
• Counts inputs and then triggers after the value in Counter is reached. [br]
[br]
[u]Logic_Emitter [/u][br]
• Emitts on trigger (to call UWE-style entities like sound event and cinematic (not logic_cinematic))[br]
[br]
[u]Logic_Emitter_Destoryer [/u][br]
• Can destroy emitted entities like sound and cinematic (when they're playing)[br]
[br]
[u]Logic_Event_Listener[/u][br]
• Triggers on special Events like game started, team won etc.[br]
[br]
[u]Logic_Function [/u][br]
• With this you can call game functions like Team1 or Team2 has won (good to combine with the Logic_Trigger and the Logic_Counter, you could let players run through a part of the map and if that happened 5 times team 1 or 2 has one...)[br]
• Will add more functions to this you can use ingame[br]
[br]
[u]Logic_Give_item[/u][br]
• Gives a specific item to the triggering player (like welder, shotgun, jetpack, even exo etc.)[br]
[br]
[u]Logic_Listener [/u][br]
• Listens on UWE-style entities like button_emitter and timed_emitter to trigger my entities[br]
[br]
[u]Logic_Lua[/u][br]
• Lets you load your costum lua file.[br]
• set your path of the lua file[br]
You need to copy the lua file for testing into the ExtraEntitiesMod folder (later you can just put it into your map folder under a new lua folder (YourMap\lua\test.lua -> write in the editor lua\test.lua), but that only works if its on workshop and you suscriped to it, so bad for testing).[br]
[br]
[u]Logic_Multiplier [/u][br]
• Will give you the opportunity to trigger mutliple things, but the mutliplier always have to be triggered by another logic entity![br]
• You need to set the name and can name up to 10 outputs to be triggered, you can also trigger another multiplier[br]
[br]
[u]Logic_Reset[/u][br]
• Resets entities to their start values (usefully to reset a timer, counter etc)[br]
[br]
[u]Logic_Switch[/u][br]
• Works a bit like a multiplier with serveral outputs, but will not fire all outputs at the same time, only one.[br]
• Direction of the next triggered entry can be set to forward, backward and random (start value can also be set to random)[br]
[br]
[u]Logic_Timer[/u][br]
• Will start to count after the game has started (when enabled), if its disabled, it will only start counting when another logic entity triggers it.[br]
• You can set wait delay to your disired value, like 120 sec for 2 min etc.[br]
[br]
[u]Logic_Trigger[/u][br]
• Triggers the output entity when a player moves through[br]
• Like the button, you can set CooldownTime, the team which can trigger it, the amount (once per player, all the time etc.)[br]
• You can set if it triggeres when an entity enters or exits.[br]
[br]
[u]Logic_Waypoint[/u][br]
• Will give a waypoint to the triggering player to the position of this entity[br]
• You can set the type of waypoint like move, weld, attack.[br]
[br]
[u]Logic_Weldable [/u][br]
• Will be trigger the output entity when beeing fully welded[br]
• You can disable it so it can only be welded after some time (with a logic_timer etc)[br]
• You can set the weld time at Weld Time in sec, when more player welds its going faster (like you weld a cc etc)[br]
[br]
[u]Logic_Worldtooltip [/u][br]
• Let's you print a short message with gui on the screen if player is near and looking at it (like in Explore mod,[br]
but this one works in the normal game, too)
[br]
[br]
_________________________________________________________[br]
NPC things:[br]
_________________________________________________________[br]
[br]
You can set the team of every npc, so it will be friends to team 1 or team 2[br]
[br]
[u]npc_wave_manager [/u][br]
• Spawns npcs in waves[br]
• You can set the amount of spawned npcs, the class, how much waves etc.[br]
• If you set wave number to 99, it will trigger all the time until it gets deactivated by another trigger[br]
• Can trigger an output if the wave ends[br]
[br]
[u]npc_spawner_marine [/u][br]
• Spawns a marine, you can set the weapon loadout[br]
[br]
[u]npc_spawner_marine_exo[/u][br]
• Spawns an Exo marine, you can set the weapon loadout[br]
[br]
[u]npc_spawner_skulk[/u][br]
• Spawns a skulk[br]
[br]
[br]
I will make a small mod to bring some extra entites to NS2, like a teleport-trigger, a drivable train etc. [br]
(the entites from hl1 that made you making some cool fun maps). I also included some npcs you can use for co-op maps etc.[br]
[br]
Mappers can use them then in their maps to create something different.[br]
The Mod will be called ExtraEntitesMod and if it's finished I will upload it to workshop.[br]
Will also include all the entites to the CombatMod.[br]
[br]
[u]Entities worked on[/u][br]
(look at the bottom at the post to see all entites, will only write here entities that i'm currently working on)[br]
• logic_power_point_listener (triggers when power in room changes)[br]
[br]
[u]Where can I get the mod?[/u][br]
[br]
If you want to get the mod, test the entities or use it on your mods (I will wrote a tutorial for that)[br]
you can download the mod "ExtraEntitiesMod" in the workshop, Id is "66f9c57"[br]
[br]
You can find the code here at GitHub:[br]
https://github.com/JimWest/ExtraEntitesMod[br]
[br]
[br]
[u]How to use the entities?[/u][br]
[br]
To select the entitys, you have to set a diferent game in the Launch-Pad. To do that, best is to download the mod (EEM) from GitHub directly into your Ns2 folder (steamapps\common\natural selection 2\ExtraEntitesMod). To Setup the launchpad, use my setup_launchpad.vbs.[br]
[br]
[br]
Only use one unique name for every entity, don't name 2 entities the same, this will cause some bugs cause the engine will only find one entity and the other will be ignored. You will need to set names to every entities that should get triggered by other entities (the engine will then find the entity inGame).[br]
[br]
_________________________________________________________[br]
Teleporters, trains etc:[br]
_________________________________________________________[br]
[br]
[u]Teleport-Trigger[/u][br]
• The cone will show you the direction of the teleporter output, it will rotate, too, when you rotate the whole trigger.[br]
• If its not only a exit (used in both directions), you need to set a name and a destination Name (name of the exit teleporter). Do the same for the 2nd teleporter (permute the names).[br]
• The wait delay in sec let the teleporter ignore the player for that time, till he will teleport him again (2 sec is a good value, you don't have to change it).[br]
• You can disable the trigger via trigger enabled - false, it will only teleport players when a logic entity (like a timer) triggered the teleporter.[br]
• You can set the teleporter to marine or alien team only, default is for both teams (not on the screen, option called Team Number).[br]
• Just ignore the Distance and Angles, thats just to show the cone in the Editor[br]
[br]
[u]Push_Trigger [/u][br]
• The cone will show you the direction of the pushforce. It will rotate, too, when you rotate the whole trigger.[br]
• You can set the Push force, but the default 30 is a good value to start testing.[br]
• You can disable the trigger via trigger enabled - false, it will only push players when a logic entity (like a timer) triggered the push_trigger.[br]
• Just ignore the Distance and Angles, thats just to show the cone in the Editor[br]
[br]
[u]Gravity_Trigger [/u][br]
• Lets you change the gravity inside this trigger for every player which is inside[br]
• You can set higher or lower gravity (0 will be no gravity, -50 higher etc., +10 would work a bit like a push trigger. Allowed are values form -100 to 100)[br]
[br]
[u]Func_Door [/u][br]
• Starts open let the door start unlocked (it will work like a normal door, but can be triggered and can be disabled)[br]
• Stay open lets the door stay open when unlocked, but will close when locked (but no open/close all the time)[br]
[br]
[u]Func_Moveable [/u][br]
• You can set any model you like (most models are invisible at the background, but you can just put the same model 180° rotate behind it and link them with the logic_multiplier)[br]
• You can scale the model as you like.[br]
• Place the model at its "finished" position, when you set Starts opened to false, it will start there in the game, too. If you let it true, the model will start above or under the vent so the vent is opened and will be closed after triggering.[br]
• Direction: currently you can only set Up, Down, Left, Right and a waypoint (use a train_waypoint for this)[br]
[br]
[u]Func_Platform[/u][br]
• Works like an elevator, needs 2 func_train_waypoints (start and end point)[br]
• You can use every model for this[br]
[br]
[u]Func_Train[/u][br]
• A drivable train, can turn every model to a train[br]
• Needs a name and refering func_train_waypoints to build a path (also add some numbers to the number entry of the waypoint, like 1 2 3 4 etc.)[br]
[br]
[u]Map_Settings[/u][br]
• Rise the view distance if you need to[br]
• you can set fall damage on or off (default off, Lerks, Skulks, JetpackMarines and Fades don't get fall damage)[br]
[br]
[u]Map_Change[/u][br]
• Lets you change the map to a specific map after getting triggered (OH yeah this is working!)[br]
[br]
[br]
_________________________________________________________[br]
Now the Logic entities:[br]
_________________________________________________________[br]
[br]
Most logic entities have only one output, but you can use the logic_mutliplier to trigger as many things as you like (for example the timer triggers a multiplier and that triggers 10 doors, or 9 doors, 1 multiplier which then triggers again another entities).[br]
[br]
[u]Logic_Breakble[/u][br]
• Destroyable Model, will play a cinematic if distroyed[br]
• You can set Health, material etc[br]
[br]
[u]Logic_Button[/u][br]
• Pushable Model (you can set every model to it), will trigger when getting pressed.[br]
• You can set CooldownTime, the team which can trigger it, the amount (once per player, all the time etc.)[br]
[br]
[u]Logic_Cinematic[/u][br]
• Let's you play a Cinematic with all logic entities[br]
• NEW: if you have a camera in your cinematic, this will set to every player so its like a cutscene[br]
[br]
[u]Logic_Counter [/u][br]
• Counts inputs and then triggers after the value in Counter is reached. [br]
[br]
[u]Logic_Emitter [/u][br]
• Emitts on trigger (to call UWE-style entities like sound event and cinematic (not logic_cinematic))[br]
[br]
[u]Logic_Emitter_Destoryer [/u][br]
• Can destroy emitted entities like sound and cinematic (when they're playing)[br]
[br]
[u]Logic_Event_Listener[/u][br]
• Triggers on special Events like game started, team won etc.[br]
[br]
[u]Logic_Function [/u][br]
• With this you can call game functions like Team1 or Team2 has won (good to combine with the Logic_Trigger and the Logic_Counter, you could let players run through a part of the map and if that happened 5 times team 1 or 2 has one...)[br]
• Will add more functions to this you can use ingame[br]
[br]
[u]Logic_Give_item[/u][br]
• Gives a specific item to the triggering player (like welder, shotgun, jetpack, even exo etc.)[br]
[br]
[u]Logic_Listener [/u][br]
• Listens on UWE-style entities like button_emitter and timed_emitter to trigger my entities[br]
[br]
[u]Logic_Lua[/u][br]
• Lets you load your costum lua file.[br]
• set your path of the lua file[br]
You need to copy the lua file for testing into the ExtraEntitiesMod folder (later you can just put it into your map folder under a new lua folder (YourMap\lua\test.lua -> write in the editor lua\test.lua), but that only works if its on workshop and you suscriped to it, so bad for testing).[br]
[br]
[u]Logic_Multiplier [/u][br]
• Will give you the opportunity to trigger mutliple things, but the mutliplier always have to be triggered by another logic entity![br]
• You need to set the name and can name up to 10 outputs to be triggered, you can also trigger another multiplier[br]
[br]
[u]Logic_Reset[/u][br]
• Resets entities to their start values (usefully to reset a timer, counter etc)[br]
[br]
[u]Logic_Switch[/u][br]
• Works a bit like a multiplier with serveral outputs, but will not fire all outputs at the same time, only one.[br]
• Direction of the next triggered entry can be set to forward, backward and random (start value can also be set to random)[br]
[br]
[u]Logic_Timer[/u][br]
• Will start to count after the game has started (when enabled), if its disabled, it will only start counting when another logic entity triggers it.[br]
• You can set wait delay to your disired value, like 120 sec for 2 min etc.[br]
[br]
[u]Logic_Trigger[/u][br]
• Triggers the output entity when a player moves through[br]
• Like the button, you can set CooldownTime, the team which can trigger it, the amount (once per player, all the time etc.)[br]
• You can set if it triggeres when an entity enters or exits.[br]
[br]
[u]Logic_Waypoint[/u][br]
• Will give a waypoint to the triggering player to the position of this entity[br]
• You can set the type of waypoint like move, weld, attack.[br]
[br]
[u]Logic_Weldable [/u][br]
• Will be trigger the output entity when beeing fully welded[br]
• You can disable it so it can only be welded after some time (with a logic_timer etc)[br]
• You can set the weld time at Weld Time in sec, when more player welds its going faster (like you weld a cc etc)[br]
[br]
[u]Logic_Worldtooltip [/u][br]
• Let's you print a short message with gui on the screen if player is near and looking at it (like in Explore mod,[br]
but this one works in the normal game, too)
[br]
[br]
_________________________________________________________[br]
NPC things:[br]
_________________________________________________________[br]
[br]
You can set the team of every npc, so it will be friends to team 1 or team 2[br]
[br]
[u]npc_wave_manager [/u][br]
• Spawns npcs in waves[br]
• You can set the amount of spawned npcs, the class, how much waves etc.[br]
• If you set wave number to 99, it will trigger all the time until it gets deactivated by another trigger[br]
• Can trigger an output if the wave ends[br]
[br]
[u]npc_spawner_marine [/u][br]
• Spawns a marine, you can set the weapon loadout[br]
[br]
[u]npc_spawner_marine_exo[/u][br]
• Spawns an Exo marine, you can set the weapon loadout[br]
[br]
[u]npc_spawner_skulk[/u][br]
• Spawns a skulk[br]
[br]
Comments
I will make a small mod to bring some extra entites to NS2, like a teleport-trigger, a drivable train etc.
(the entites from hl1 that made you making some cool fun maps).
Mappers can use them then in their maps to create something different.
The Mod will be called ExtraEntitesMod and if it's finished I will upload it to workshop.
Will also include all the entites to the CombatMod.
So stay tuned :-)<!--QuoteEnd--></div><!--QuoteEEnd-->
This could allow elevators in game, which would be awesome
<center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/CQvQFLilTQs"></param><embed src="http://www.youtube.com/v/CQvQFLilTQs" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
Just my suggestion...
My brother has been poking around with the map editor for the past few days, and this thread will probably make his day.
<center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/CQvQFLilTQs"></param><embed src="http://www.youtube.com/v/CQvQFLilTQs" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center><!--QuoteEnd--></div><!--QuoteEEnd-->
I cannot wait to see what else you create. This is a great step on the way to a bright future!
thats the reason why we dont have yet elevators in the game, its a can of worms :D
you can try to modify ControllerMixin, but you would also need to adjust some of the players code, which will turn out as quite big task i bet
( ignore the path moving, thats totally bugged, I know ^^)
<center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/yPTNwgTrcYg"></param><embed src="http://www.youtube.com/v/yPTNwgTrcYg" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
but I don't get it right.
I think I got the right formula to calculate the right position for the player, but the player seems alyways to get teleportet to the origin of the train.
Edit:
And, somethings really strange.
When I set a Trigger on the physics model of the train with:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->self.physicsModel:SetTriggerEnabled(true)<!--c2--></div><!--ec2-->
The train has no collision anymore, even if I enable the Collision with
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->self.physicsModel:SetCollisionEnabled(true)<!--c2--></div><!--ec2-->
What other entities do you have planned?
Id quite like to see a simple push force, either a wind like effect while inside the trigger or better yet a quake style launch pad, not to do anything crazy but for a fun effect i have planned, i can do something similar now using gravity but it doesn't work as well as skulks are sticky, if only there was a non-stick surface...
Y a push trigger.
Btw., a onos can actually ride the train:
<center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/NiI9gwFWY9U"></param><embed src="http://www.youtube.com/v/NiI9gwFWY9U" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
Btw., a onos can actually ride the train:
<center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/NiI9gwFWY9U"></param><embed src="http://www.youtube.com/v/NiI9gwFWY9U" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center><!--QuoteEnd--></div><!--QuoteEEnd-->
Awesome! That Onos seems to be having loads of fun :P
its the new position - the old one) and then I'll try to get the right point after turning with that function:
( i save the degrees everytime the train is turning, so they should be right)
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->newOrigin.z = trainOrigin.z + (math.cos(degrees) * (entOrigin.z - trainOrigin.z) - math.sin(degrees) * (entOrigin.x - trainOrigin.x))
newOrigin.x = trainOrigin.x + (math.sin(degrees) * (entOrigin.z - trainOrigin.z) + math.cos(degrees) * (entOrigin.x - trainOrigin.x))<!--c2--></div><!--ec2-->
But as you can see in the vid, it isn't perfect.
<!--coloro:#aadd00--><span style="color:#aadd00"><!--/coloro-->True, I'm hoping that would be the easier part at least.
Edit:Edit(terrible structure): How hard would you say it'd be to trigger an object just sitting in front of and below or above just sliding up (or down) over the vent as a quick solution in the meantime?<!--colorc--></span><!--/colorc-->
The train is working now fine.
RUN AWAY
RUN AWAY
Anyway
GO JIM
WE'RE ROOTING (FOR) YOU!
it also checks now if you're jumping, when yes then the train will drive ahead and let you at your old position.
I've also created a waypoint system where the mapper can create waypoints, give them Ids and even a wait delay
so the train will wait for the delay till he's driving ahead.
I also started the push_trigger, it's also nearly finished but I don't know what Editor model I should use.
Here's the vid from the newest train:
<center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/zhvqFqC4XU0"></param><embed src="http://www.youtube.com/v/zhvqFqC4XU0" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>