Another bunch of questions
Posted: Fri Nov 21, 2014 5:50 pm
Hello folks. ANother challenge for scripters. Whoever will help will be credited which is the smallest thanks I can give you.
1. I´d like to define some spell to be castable just by any particular champion (based on name or trait will do) I think just some condition IF champion(name...) could work.
2. Script help. I have swamp_ground2 tile in the editor (eleveation floor is -1). When party dig here, I need that tile to be changed for beach_ground_stones with -2 floor elevation. So in real you will just dig regular pit (the same as placing one tile with different elevation).
3. Script help. I would like to define blob object (flying blob), which when party get hit, it moves whole party 1 square back (similar to air_elemental attack)
4. SOLVED- define creature (for now for example ogre clone), which will be indestructible by any regular attack, spell or whatever. Maybe some air elemental clone ?
Solved by Doridion
just adjust air_elemental imminuties to spell
5. SOLVED - I have spawner mummy1,mummy2 and mummy3 triggered by plate. What I need this plate to re-spawn these mummies just in case they are all dead (otherwise that trigger will do nothing)
Solved by Batty
6. SOLVED - weight puzzle where you need put items with certain weight in each alcove. voontrag already helped me to rewrite part of the script however still not working. In case you want create it from scratch no prob.
Solved by mahric, adviced by Isaac
thanks for any help
1. I´d like to define some spell to be castable just by any particular champion (based on name or trait will do) I think just some condition IF champion(name...) could work.
2. Script help. I have swamp_ground2 tile in the editor (eleveation floor is -1). When party dig here, I need that tile to be changed for beach_ground_stones with -2 floor elevation. So in real you will just dig regular pit (the same as placing one tile with different elevation).
3. Script help. I would like to define blob object (flying blob), which when party get hit, it moves whole party 1 square back (similar to air_elemental attack)
4. SOLVED- define creature (for now for example ogre clone), which will be indestructible by any regular attack, spell or whatever. Maybe some air elemental clone ?
Solved by Doridion
just adjust air_elemental imminuties to spell
SpoilerShow
Code: Select all
defineObject{
baseObject = "base_monster",
name = "air_elemental",
components = {
{
class = "Model"
name = "model",
model = "assets/models/monsters/uggardian.fbx",
enabled = false,
storeSourceData = true,
},
{
class = "Animation",
name = "animation",
animations = {
fall = "assets/animations/monsters/uggardian/uggardian_get_hit.fbx",
attack = "assets/animations/monsters/air_elemental/air_elemental_attack.fbx",
turnRight = "assets/animations/monsters/uggardian/uggardian_turn_right.fbx",
getHitFrontLeft = "assets/animations/monsters/uggardian/uggardian_get_hit_front_left.fbx",
getHitRight = "assets/animations/monsters/uggardian/uggardian_get_hit_right.fbx",
getHitBack = "assets/animations/monsters/uggardian/uggardian_get_hit_back.fbx",
strafeRight = "assets/animations/monsters/uggardian/uggardian_strafe_right.fbx",
getHitFrontRight = "assets/animations/monsters/uggardian/uggardian_get_hit_front_right.fbx",
moveForward = "assets/animations/monsters/uggardian/uggardian_walk.fbx",
turnLeft = "assets/animations/monsters/uggardian/uggardian_turn_left.fbx",
idle = "assets/animations/monsters/uggardian/uggardian_idle.fbx",
getHitLeft = "assets/animations/monsters/uggardian/uggardian_get_hit_left.fbx",
strafeLeft = "assets/animations/monsters/uggardian/uggardian_strafe_left.fbx"
},
currentLevelOnly = true
},
{
class = "Monster",
name = "monster",
meshName = "uggardian_mesh",
traits = { "elemental" },
hitEffect = "hit_goo",
hitSound = "air_elemental_hit",
dieSound = "air_elemental_die",
immunities = { "sleep", "blinded", "frozen" },
resistances = {
poison = "immune",
fire = "immune",
physical = "immune",
cold = "immune",
shock = "absorb"
},
health = 170,
exp = 400,
protection = 0,
evasion = 0,
capsuleHeight = 0.6,
capsuleRadius = 0.3,
collisionRadius = 0.8
flying = true,
onDie = function() print('Cannot Scrape Functions'); end,
},
{
class = "MeleeBrain",
name = "brain",
sight = 5
seeInvisible = true,
},
{
class = "MonsterMove",
name = "move"
sound = "air_elemental_walk",
animationSpeed = 1.3,
cooldown = 3,
},
{
class = "MonsterTurn",
name = "turn",
sound = "air_elemental_walk"
animationSpeed = 1.5,
},
{
class = "MonsterAttack",
name = "basicAttack",
damageType = "pure",
sound = "air_elemental_attack",
screenEffect = "leafburst_screen",
woundChance = 25,
animationSpeed = 1.5,
cooldown = 6,
accuracy = 100,
attackPower = 30
knockback = true,
cameraShake = true,
},
{
class = "UggardianFlames",
name = "uggardianflames",
emitFromMaterial = "*",
particleSystem = "air_elemental"
},
{
class = "Sound",
name = "sound",
parentNode = "head"
sound = "air_elemental_wind",
}
}
}Solved by Batty
SpoilerShow
Code: Select all
Instead of using spawners, have the plate trigger this function, just fill in the spawner locations:
function mSpawn()
if not findEntity('mummy_spawn1') and not findEntity('mummy_spawn2') and not findEntity('mummy_spawn3') then
spawn('mummy', level, x, y, facing, elevation, 'mummy_spawn1')
spawn('mummy', level, x, y, facing, elevation, 'mummy_spawn2')
spawn('mummy', level, x, y, facing, elevation, 'mummy_spawn3')
end
end
Solved by mahric, adviced by Isaac
SpoilerShow
Code: Select all
weight = 0
weight2 = 0
weight3 = 0
weight4 = 0
finish = 0
function weightcheck()
if finish == 0 then
weight = 0
weight2 = 0
weight3 = 0
weight4 = 0
-- following part already rewritten
for _, i in alcw1.surface:contents() do
weight = weight + i:getWeight()
end
for _, j in alcw2.surface:contents() do
weight2 = weight2 + j:getWeight()
end
for _, k in alcw3.surface:contents() do
weight3 = weight3 + k:getWeight()
end
for _, l in alcw4.surface:contents() do
weight4 = weight4 + l:getWeight()
end
--end of rewritten part
check()
end
end
function check()
if finish == 0 then
if weight == 1 and
weight2 == 0 and
weight3 == 0 and
weight4 == 0 then
iron_weight.door:open()
playSound("secret")
finish = 1
else
iron_weight.door:close()
end
end
end