Page 1 of 1

Mg 42 ai script error

Posted: Mon Jan 05, 2004 2:22 pm
by martijn_NL
I added a mg 42 with with ai, just like the tut on .MAP, but i get strange error.
Set stream error - Unable to open file. - sound/vehicle/veh_truck_on.wav
if (self.spawn_left == NIL || self.spawn_left <= 0) (global/mg42_active.scr, 151)
if (self.spawn_left == NIL || self.spawn_left ^

^~^~^ Script Error: binary '<=' applied to incompatible types 'string' and 'int'

if (self.spawn_left == NIL || self.spawn_left <= 0) (global/mg42_active.scr, 151)
if (self.spawn_left == NIL || self.spawn_left ^

^~^~^ Script Error: binary '<=' applied to incompatible types 'string' and 'int'
I think this is realy weird because i didn't make String or int variables. You guys know a solution?

Posted: Mon Jan 05, 2004 2:57 pm
by jv_map
I think there is a minor error in that tut I forgot to fix :oops:

I think you've set (for the mg-42) key/value
$spawn_left / (number)

whereas it should be
#spawn_left / (number)

Posted: Mon Jan 05, 2004 3:15 pm
by bdbodger
I think the problem is you have to set the number of times they will spawn by setting key:#spawn value: 4 ( or whar ever )

this is in that script
self.spawn_left = self.spawn

mg42_spawn:

if (self.spawn_left == NIL || self.spawn_left <= 0)
end

Posted: Mon Jan 05, 2004 10:03 pm
by martijn_NL
thanks it worked out. The error does not appear any more.

But i have another question about mg42 and ai.
Normaly when the ai is goning to use the mg-42, the ai is going to sit down, which as result that the ai can't see any more ( I made a bunker, almost exactly as manstein's bunker tut). So that's not good. Anybody knows a solution for that.

Posted: Wed Jan 14, 2004 9:57 am
by jv_map
Hmm try placing the mg-42 a little lower or place the AI on a clip brush so it's higher :)