svarionare
  • svarionare
  • 74.75% (Friendly)
  • Private Topic Starter
15 years ago
hello!
I'm making a map in which a unit is spawned to player-civilian, which is enemy of player0(me) and i am enemy of player-civilian,and after a waypoint-path it must start hunting.What is strange is that only some units execute that order while others are standing doing nothing: for example, at he end of waypoint_path, jarmen kell does nothing while a terrorist or a rebel attack: why?
thanx
Sponsor
Drummin
15 years ago
You are dealing with PlyrCivilian who has limited team support. I have found, not much beyond the default teamPlyrCivilian will work reliably. As PlyrCivilian wasn't intended to be an active player in the game I suppose the engine wasn't scripted for jarmen kell.
svarionare
  • svarionare
  • 74.75% (Friendly)
  • Private Topic Starter
15 years ago
And so if I write the right combination of scripts, is it possible to spawn units and use their special powers on attacking with player-civilian?
Drummin
15 years ago
I would suggest trying named units and scripting unit upgrades, command abilities and actions as I mentioned sub-teams are not well supported.
svarionare
  • svarionare
  • 74.75% (Friendly)
  • Private Topic Starter
15 years ago
Thank you for reply.
That's what I'm doing:named units!But the trouble is that I haven't understood how to write script(s) through which get a particular behaviour of the unit (for example: jarmen kell who follows a path then use one of his abilities or hunt or whatever),and how to get sciences needed...
The first says:
[nsAD]
*** IF ***
True.
*** THEN ***
[???] Player 'player0' considers Player 'PlyrCivilian' to be Enemy
[???] Player 'player1' considers Player 'PlyrCivilian' to be Enemy
[???] Player 'PlyrCivilian' considers Player 'player0' to be Enemy
[???] Player 'PlyrCivilian' considers Player 'player1' to be Enemy

Then another one which says:
nsAD
*** IF ***
True.
*** THEN ***
Enable Script 'spawn_saboteur'. [b/]

This script: spawn_saboteur:
nsnaD
*** IF ***
True.
*** THEN ***
Spawn Unit 'saboteur' of type 'GLAInfantryJarmenKell' on Team 'teamPlyrCivilian' at waypoint Waypoint 'spawn_saboteur'
Unit 'saboteur' follows waypoints, beginning at Waypoint Path 'saboteur_path'
Enable Script 'saboteur_attack'.
Enable Script 'saboteur_destroyed'.

This: saboteur_attack
nsnaD
*** IF ***
Unit 'saboteur' has reached the end of Waypoint Path 'saboteur_path'
*** THEN ***
Unit 'saboteur' use Ability 'Command_GLAInfantryJarmenKellSnipeVehicleAttack' at Waypoint 'saboteur_arrive'.
Show military briefing String: 'saboteur_arrived' for 3000 milliseconds.

And then this one: saboteur_destroyed
🅱 nsnaD
*** IF ***
Unit 'saboteur' has been destroyed.
*** THEN ***
Enable Script 'spawn_saboteur'.


All waypoints and path are correctly prepared...
Is this correct?
thanks







Drummin
15 years ago
Your scripts look fine but understand that many scripted things take testing and revisions. You can say "why isn't it working?", Maybe it's that the condition "Unit 'saboteur' has reached the end of Waypoint Path 'saboteur_path'" isn't working. So to test, change that condition to true and see if he will snipe attack after you spawn the unit. Maybe the script needs to be an active subroutine script (As MANY of the action scripts need to be) so change the script settings to [SAnd] and see how he behaves.
This: saboteur_attack
SAnd
*** IF ***
True.
*** THEN ***
Unit 'saboteur' follows waypoints, beginning at Waypoint Path 'saboteur_path'
Unit 'saboteur' use Ability 'Command_GLAInfantryJarmenKellSnipeVehicleAttack' at Waypoint 'saboteur_arrive'.
You could also try making a team (though not sure about sub teams under PlyrCivilian) and have the OnBuild subroutine script say.

Just keep trying things.
EDIT: You might also check by adding unit 'saboteur' considers player 'player0 to be an enemy just in case he's not picking up the team player relationship.
yurdeath2010
15 years ago
another way to tell exactly which part of your scripts is not working, add another string in each script. These strings are temporary and will only stay until you determine which one is not working correctly. You just need a string that says "script