Prozail wrote:My guess is it's a leftover from LoG1 that is not used anymore since the new component system, and should simply be removed from the scripting reference.
You can do the same thing, albeit a bit more verbose, like this. Just check the reference for
ProjectileComponent
Code: Select all
local s = spawn("poison_bolt",sender.go.level,sender.go.x,sender.go.y,sender.go.facing,0)
s.projectile:setIgnoreEntity(party)
s.projectile:setAttackPower(10)
print(s:getWorldPosition())
s:setWorldPosition(13.5,1.35,28,5,0) -- just toying around with values here...
Well shootProjectile is documented in the global functions examples of the official scripting reference of Grimrock 2. It would be odd if it was there but deprecated.
I tried to build a simple spell that throws a rock, and also tried examples from Grimrock 1 mods, but so far nothing works...
I managed to launch several magic projectiles with your spawn code, fireballs, lightning bolts, poison bolts, ice bolts, etc... But all the projectile items such as "rock" are not considered projectile in Grimrock 2 !!! So s.projectile is an invalid reference if you replace "poison_bolt" by "rock" in your example. What am I missing ?
Also one of my goals would be to build spells similar to meteor storm for the other magic schools, such as the multiple poison bolts that monsters use in the last dungeon.
Do you know how to delay and move the start positions of multiple projectiles to recreate the meteor spell ?