Code: Select all
local.bomb_offset = local.bomb.origin - local.base.origin (maps/obj/mainobj.scr, 61)
local.bomb_offset = local.bomb^
Script Error: Cannot cast 'array' to listenerModerator: Moderators
Code: Select all
local.bomb_offset = local.bomb.origin - local.base.origin (maps/obj/mainobj.scr, 61)
local.bomb_offset = local.bomb^
Script Error: Cannot cast 'array' to listenerPlease state my words are wrong instead of changing my words and then prove them wrongsorry jv what you said makes no sense . As an array can never have one origin? I guess you mean is one element . that is not true .
No. local.bomb is an array but should be a listener, like the error message says. Arrays can not have variables like listeners can, so .origin is not allowed. In fact you need to define a listener, which is probably an element of the local.bomb array.local.bomb_offset is the listener and local.bomb.origin is a 3 element array to make
This confuses me too how do you define an origin ? I think of it as 3 numbers that specify a position in the game . Well if you can clear all this up for me I might ask you about vectors next hahaha .The problem is, that an array of multiple elements can't have one origin, but needs an origin for every element (listeners in this case).
and what is the syntax for that is it local.bomb_offset = vector_length ( local.bomb.origin local.base.origin ) . or was he looking for how far above it it was or far to the left or right or infront or in back of it was . Any way thanks for crearing that up . I think I may have a grasp on it now .local.bomb_offset = local.bomb.origin - local.base.origin