HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

CreateUnitAtLoc failing to work

02-10-2007, 02:07 PM#1
Strategy Master
I'm currently come accross an issue which i hope someone may have an answer to.

For some reason this hardcoded function decides to not work.

Code:
set u = CreateUnitAtLoc(ai_player, WISP, home_location, 270.00)

I've checked the parameters themselves and they are all correct so does anyone know of other conditions that can make creating a unit fail. In game there appears to be enough space for the units to spawn so that can't be the problem. And usuallly if there isn't the unit is created at an offset automatically. Any ideas?
02-10-2007, 02:29 PM#2
Vexorian
I only know of a condition that makes natives in general fail, and it is related to usage of wrong addresses converted to unit and SetUnitX/Y , it eventually screws up the engine, something similar might cause this as well.

Are you possitively sure the arguments are all right? , also, have you tried without a location but just coordinates?
02-10-2007, 03:04 PM#3
Strategy Master
set u = CreateUnit(ai_player, WISP, GetLocationX(home_location), GetLocationY(home_location), 270.00)

Just tried this and it works fine but other way still dosn't. Very odd but that fixes it. Cheers Vex