Problem with script

» Siedler Map Source Forum » Siedler DEdK Script Forum » Problem with script

Seiten: 1

Qba331PL
#1
10.05.2018 16:46
Beiträge: 102

Problem with script

Hi!

I've got some problems with script in my new map. For some time, It was working, but when I wrote new functions, it stopped. I don't really know why.

Here is link to download map:
https://drive.google.com/open?id=1_SxOAeYUFPOJCi4WASmYo7QB_a6GWEpL

I think the problem is the IsDead job for armyOne or something connected with SetupPlayerAi. Job stopped working when I edited it (yeah, I changed one number in this Setup and it stopped working, strange, maybe I'm doing something wrong )

Problem appears on the begining of the map, after killing the armyOne.
Script should create NPC Dario.

I really need your help,
Qba331PL

mcb
#2
11.05.2018 13:59
Beiträge: 1472

The only thing i see at the moment is, that you use the army-id 1, and the ai you activate uses it too.
So changing the army id of armyOne to 0 should help.

Qba331PL
#3
11.05.2018 21:36
Beiträge: 102

Yeah, it works now

One more thing. Is there a function that kill entity(hero, serf, settlers). Something like DestroyEntity but with animation?

mcb
#4
11.05.2018 23:28
Beiträge: 1472

SetHealth(name, 0)


It sets the percentage of health, the target entity has. So 100 is full health and 0 is no health->dying.

Qba331PL
#5
13.05.2018 13:33
Beiträge: 102

Thank you

Seiten: 1

SiteEngine v1.5.0 by nevermind, ©2005-2007
Design by SpiderFive (www.siedler-games.de) - English translation by juja

Impressum