Hi all.
I am relatively new to modding games, and have begun working on a small module to help me get the general ideas of certain things. Currently I have a single area which is linked to the single player campaign. I can get there and exit there using the world map and area transitions.
I have created a plot (just a small one) and was looking for some help on scripting a small thing.
I would like a group of darkspawn (team 3) to move from their current location to close to the party after either a conversation exits or a plot point changes. When you enter the area there is a guy laying on the floor, you talk to him and I want you to be attacked by darkspawn which are further down the path (i.e. the darkspawn see you talking to him and run at you). I pressume this is done by scripts.
My question then - How do you make a team of enemies move towards/attack a player? I was thinking I could dramitically increase their sight range and make them spot you, but that might cause issues later depending on the future of the module.
Thanks in advance.
Script to move enemies
Débuté par
Nwalya42
, déc. 05 2009 02:26
#1
Posté 05 décembre 2009 - 02:26
#2
Posté 05 décembre 2009 - 07:45
UT_TeamMove will do what you want.
#3
Posté 05 décembre 2009 - 11:28
Hi - Thanks for the input! Small problem though - UT_TeamMove doesn't exist - at least not in the publically available toolset. The only function that begins with UT_ is UT_GetNearestObjectByTag, which doesn't really help. I've been working on a slightly different way, but need to use CommandMoveToObject. Only thing is that I don't know how to make an object use the command.
[code=auto:0]
void main()
{
object oPC = GetHero();
object oteamthree[] = GetTeam(3,0);
switch(oteamthree[])
{
CommandMoveToObject(oPC,True,1.0f,FALSE,0.0f);
}
break;
}
[\\code]
Not sure about the use of switch. I get a parsing variable list error when running this on the 4th line. Again, help would be appreciated
[code=auto:0]
void main()
{
object oPC = GetHero();
object oteamthree[] = GetTeam(3,0);
switch(oteamthree[])
{
CommandMoveToObject(oPC,True,1.0f,FALSE,0.0f);
}
break;
}
[\\code]
Not sure about the use of switch. I get a parsing variable list error when running this on the 4th line. Again, help would be appreciated
Modifié par Nwalya42, 05 décembre 2009 - 11:29 .
#4
Posté 05 décembre 2009 - 11:57
You need to include utility_h in your script in order to find/use UT_TeamMove.
Modifié par Challseus, 06 décembre 2009 - 12:01 .
#5
Posté 06 décembre 2009 - 12:38
Ahha! Thank you so much! Is there a list of possible libraries anywhere? (e.g. Utility_h, events_h)
#6
Posté 06 décembre 2009 - 01:04
Yup. You can see those under "_Core includes", in your toolset palette.
#7
Posté 06 décembre 2009 - 01:13
Ahha again! Thanks a heap - should make life easier in the future





Retour en haut







