UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Radiant Actor Help!

HOT
broken avatar :(
Created 7 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
4,151 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
does anyone know the simplest way to ...

1: set an Actors ( Soldier aka marine for example ) health?
2: is there a way to set the actors goal to move to and use cover?
3: create a use button to spawn said actor as many as you want?



if anyone knows how to explain how to do this in radiant in the clearest way so that i can understand how to do it i would highly appreciate it!!
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
I didnt test this in zombiemode much but it should be enough to get you started.
Unstamp prefab into your radiant map. Make sure the spawner targets the cover nodes after unstamping. You can also put a traverse (wall_hop) between the spawner and cover nodes and he will do the traverse anim on the way to the node.
In your mods/mapname/maps/mapname.gsc
zombiemode::main();
thread spawn_trig_example();
Then paste the entire function at the very bottom of your mapname.gsc

https://www.mediafire.com/download/347mika6447d03n
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
I didnt test this in zombiemode much but it should be enough to get you started.
Unstamp prefab into your radiant map. Make sure the spawner targets the cover nodes after unstamping. You can also put a traverse (wall_hop) between the spawner and cover nodes and he will do the traverse anim on the way to the node.
In your mods/mapname/maps/mapname.gsc
zombiemode::main();
thread spawn_trig_example();
Then paste the entire function at the very bottom of your mapname.gsc

https://www.mediafire.com/download/347mika6447d03n
i litterally have no idea how to do what you just said? unstamp?

Double Post Merge: May 02, 2017, 06:44:28 pm
I didnt test this in zombiemode much but it should be enough to get you started.
Unstamp prefab into your radiant map. Make sure the spawner targets the cover nodes after unstamping. You can also put a traverse (wall_hop) between the spawner and cover nodes and he will do the traverse anim on the way to the node.
In your mods/mapname/maps/mapname.gsc
zombiemode::main();
thread spawn_trig_example();
Then paste the entire function at the very bottom of your mapname.gsc

https://www.mediafire.com/download/347mika6447d03n

also i cant seem to spawn a cover node
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
Unstamp is a button in the radiant toolbar. It unstamps prefabs into your map.
http://wiki.modsrepository.com/index.php?title=Call_of_Duty_5:_Toolbar
//
Load prefab in you map, then unstamp the prefab.
Paste the single line of code from the text file under zombiemode::main(); in mapname gsc
Paste the function from the text file at the bottom of mapname.gsc
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Unstamp is a button in the radiant toolbar. It unstamps prefabs into your map.
http://wiki.modsrepository.com/index.php?title=Call_of_Duty_5:_Toolbar
//
Load prefab in you map, then unstamp the prefab.
Paste the single line of code from the text file under zombiemode::main(); in mapname gsc
Paste the function from the text file at the bottom of mapname.gsc



I got it to work! :D but i still need help on how to make a spawner a buyable. also my Marines wont use the cover but the Axis will...idk y but ill fix it but i need to make a ally_spawner a buyable so you can buy troops to spawn in!
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
U can look in the zombiemode perks script for a long example on how to charge a player a cost. Or check different tuts from users on this site that have buyable trigs u can use for an example.
The prefab i sent was an allies/marine spawner and it works as intended in a new zombie map.
I didnt try with an axis guy so there might be a conflict with both of them and the cover nodes.
You can set the health with
Spawned_guy.health = 1234;
//
You will need to look through some of the raw/maps folder at some campaign scripts (ber mak and oki2/oki3) to see how to use guys properly. Search for Stalingradspawn or dospawn and see what types of settings they put on guys.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
U can look in the zombiemode perks script for a long example on how to charge a player a cost. Or check different tuts from users on this site that have buyable trigs u can use for an example.
The prefab i sent was an allies/marine spawner and it works as intended in a new zombie map.
I didnt try with an axis guy so there might be a conflict with both of them and the cover nodes.
You can set the health with
Spawned_guy.health = 1234;
//
You will need to look through some of the raw/maps folder at some campaign scripts (ber mak and oki2/oki3) to see how to use guys properly. Search for Stalingradspawn or dospawn and see what types of settings they put on guys.


what do you mean set there health? i need more of an explanation as i am looking how to change there health in radiant
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
To put the health as kvp in radiant still requires adding a line in script.
kvp     script_health    500
Then in script after the animname line you need to put
Spawned_guy.health = spawner_guy.script_health;
//
Or
//
To do it only through script add this health line after the animname line
Spawned_guy.health = 500;
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Unstamp is a button in the radiant toolbar. It unstamps prefabs into your map.
http://wiki.modsrepository.com/index.php?title=Call_of_Duty_5:_Toolbar
//
Load prefab in you map, then unstamp the prefab.
Paste the single line of code from the text file under zombiemode::main(); in mapname gsc
Paste the function from the text file at the bottom of mapname.gsc


alright! well there is still one more thing i need to ask. is there anyway to get friendly AI to follow the Player like in the map AI TEST By Nameless?

i also am having trouble getting the Spawner to target all the nodes

would you mind explaining to me how to get the spawner all the cover nodes i placed on the map? btw the map is noded well so i know its not a path problem.


broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
If the trig/guy/nodes is in the radiant map then you need to open mods/mapname/maps/mapname.gsc in notepad or notepad++ and paste the stuff from the link.

You should do some tuts from the wiki with pictures just to see the general idea of radiant and scripts and where stuff goes.
Then the stuff i posted will only take you 1 minute to add to your map.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
XD i got it! the spawner trigger works just the AI dont move to the Nodes when told.

i also just wanted to say i really appreciate your help!!! its really helping me make maps with AI. Anyways My map requires friendly AI for the Player to have some assistance and stuff. its just what really gives me issues is the nodes. for some reason the Axis aka Enemy troops i spawn in are able to go to nodes just fine but the Ally's act like they are not there and just stand where they are to shoot. again i appreciate your help! and now know how to do the coding line and the other stuff you said! it was confusing at first but i managed to get the code lines and stuff in the map and its working great! just nodes im having problems with!
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
Glad to help.

In radiant is there a line from the spawner to the 4 cover nodes? It might have broke the connection when unstamping it.
If the spawner from the prefab targets a node (select spawner then node and press w) the spawned guy will go to it.
If there is still axis in the map its possible the guys get distracted before reaching the node(try without axis in map).
There are commands like spawner_guy.ignoreall that would be used if its the problem. Look through campaign scripts for examples.
//
To go to a player u can use

Leader = get_players()[0];
Spawned_guy.goalradius = 512;
Spawned_guy setgoalpos(leader.origin);
Spawned_guy waitill("goal");
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
so to get them to follow me i just put that line of code in the mapname.GSC again? if so where do i put it to replace the old code for them to follow me?

i just need to replace some of the lines of code in it? if so i kinda need help to know which ones to replace with the ones you sent me for the ALLY's to follow players
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
You need to learn some scripting if you want complete features like that in your map. Or design a great map and other modders will help.
This is only for 1 player and has no checks for if the player is dead or disconnected ect so it will cause issues if the player is being revived.
//untested
//Spawned_guy thread updatemy_pos();
Updatemy_pos()
{
Self endon ("death");
//self is spawned_guy
While(1)
{
Leader = get_players()[0];
Self.goalradius = 512;
Self setgoalpos(leader.origin);
Self waitill("goal");
Wait (randomfloatrange(1,4));
}
}
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
You need to learn some scripting if you want complete features like that in your map. Or design a great map and other modders will help.
This is only for 1 player and has no checks for if the player is dead or disconnected ect so it will cause issues if the player is being revived.
//untested
//Spawned_guy thread updatemy_pos();
Updatemy_pos()
{
Self endon ("death");
//self is spawned_guy
While(1)
{
Leader = get_players()[0];
Self.goalradius = 512;
Self setgoalpos(leader.origin);
Self waitill("goal");
Wait (randomfloatrange(1,4));
}
}

so your saying i should look up scripting first? maaannn i thought i just replaced some stuff in the text file you sent me :( well do you have any links that will teach me how to do what you sent me?  or can you just tell me how to do it? because this is the last thing i need for the maps AI to be completed then i will get to work on the map a little more itself not the AI side of it. also you said that you can make the spawner target nodes? if so whats the function for it? or targetname for him to target all the nodes?

 
Loading ...