Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
So, that means I can't adress the monstergroup itself but only the monsters in it? And how to know their IDs?
Or is the only moment to do something with a monstergroup when the mod got started the first time ?
Or is the only moment to do something with a monstergroup when the mod got started the first time ?
Re: Ask a simple question, get a simple answer
If you are spawning them at a known location, you can check for all objects at that location, and get their ids.
- Eleven Warrior
- Posts: 746
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Ask a simple question, get a simple answer
How do I spawn a note or scroll onto a altar with a message on either one of them ty
I can do this but not sure about the add message bit
I can do this but not sure about the add message bit
Code: Select all
spawn("note",14,28,1,3,"note_2")
g1_table_3.surface:addItem(note_2.item)
Re: Ask a simple question, get a simple answer
Code: Select all
function addTextNote(shelf, objectId, text)
if text and findEntity(shelf).surface and not findEntity(objectId) then
findEntity(shelf).surface:addItem(spawn("scroll",nil,nil,nil,nil,nil,objectId).item)
if findEntity(objectId) then
findEntity(objectId).scrollitem:setScrollText(text)
end
else print('error: input must not be nil', self.go.id..".addTextNote", shelf, objectId, text, " " )
end
end
addTextNote("dungeon_alcove_1", "note_2", "Not all that glitters is gold")
Re: Ask a simple question, get a simple answer
I don't understand why, in this object, the animation don't work:
Code: Select all
defineObject{
name = "forest_spruce_sapling_pillar",
baseObject = "base_pillar",
components = {
{
class = "Model",
model = "assets/models/env/forest_spruce_sapling_02.fbx",
staticShadow = true,
},
{
class = "Animation",
animations = {
sway = "assets/animations/env/forest_spruce_sapling_02_idle.fbx",
},
playOnInit = "sway",
loop = true,
maxUpdateDistance = 6,
},
},
automapIcon = -1,
minimalSaveState = true,
}
Re: Ask a simple question, get a simple answer
I removed the experience line from this standard ice_guardian taken directly from default assets.
As I try to place this "custom ice_guardian1" the editor crashes.
As I try to place this "custom ice_guardian1" the editor crashes.
Code: Select all
defineObject{
baseObject = "base_monster",
name = "ice_guardian1",
components = {
{
name = "model",
class = "Model",
storeSourceData = true,
model = "assets/models/monsters/ice_guardian.fbx"
},
{
animations = {
fall = "assets/animations/monsters/ice_guardian/ice_guardian_get_hit_front_left.fbx",
attack = "assets/animations/monsters/ice_guardian/ice_guardian_attack_close.fbx",
getHitFrontLeft = "assets/animations/monsters/ice_guardian/ice_guardian_get_hit_front_left.fbx",
rangedAttack = "assets/animations/monsters/ice_guardian/ice_guardian_attack_far.fbx",
turnRight = "assets/animations/monsters/ice_guardian/ice_guardian_turn_right.fbx",
getHitRight = "assets/animations/monsters/ice_guardian/ice_guardian_get_hit_right.fbx",
getHitFrontRight = "assets/animations/monsters/ice_guardian/ice_guardian_get_hit_front_right.fbx",
strafeRight = "assets/animations/monsters/ice_guardian/ice_guardian_strafe_right.fbx",
getHitBack = "assets/animations/monsters/ice_guardian/ice_guardian_get_hit_back.fbx",
moveForward = "assets/animations/monsters/ice_guardian/ice_guardian_walk.fbx",
turnLeft = "assets/animations/monsters/ice_guardian/ice_guardian_turn_left.fbx",
idle = "assets/animations/monsters/ice_guardian/ice_guardian_idle.fbx",
getHitLeft = "assets/animations/monsters/ice_guardian/ice_guardian_get_hit_left.fbx",
strafeLeft = "assets/animations/monsters/ice_guardian/ice_guardian_strafe_left.fbx"
},
class = "Animation",
name = "animation",
currentLevelOnly = true
},
{
hitSound = "ice_guardian_hit",
health = 500,
immunities = {
"sleep",
"blinded"
},
meshName = "ice_guardian_mesh",
capsuleRadius = 0.3,
deathEffect = "death_icy",
protection = 10,
resistances = {
cold = "absorb",
fire = "weak"
},
class = "Monster",
flying = true,
hitEffect = "hit_ice",
traits = {
"elemental"
},
evasion = 10,
dieSound = "ice_guardian_die",
capsuleHeight = 0.6,
name = "monster",
collisionRadius = 0.8
},
{
sight = 5,
seeInvisible = true,
class = "IceGuardianBrain",
name = "brain",
morale = 100
},
{
animationSpeed = 1.3,
cooldown = 3,
sound = "ice_guardian_walk",
class = "MonsterMove",
name = "move"
},
{
animationSpeed = 1.5,
class = "MonsterTurn",
name = "turn",
sound = "ice_guardian_walk"
},
{
sound = "ice_guardian_walk",
class = "MonsterChangeAltitude",
name = "changeAltitude"
},
{
animation = "attack",
onAttack = function() print('Cannot Scrape Functions'); end,
cooldown = 5,
sound = "ice_guardian_attack",
class = "MonsterAttack",
name = "basicAttack",
attackPower = 30
},
{
animationSpeed = 1.5,
shootProjectile = "frostbolt",
attackType = "projectile",
class = "MonsterAttack",
animation = "rangedAttack",
cooldown = 3,
sound = "ice_guardian_attack",
name = "rangedAttack",
attackPower = 30
},
{
name = "light",
offset = {
0,
0.5,
0.25,
0
},
color = {
0.5,
0.8,
1.7,
0
},
parentNode = "light1",
fillLight = true,
class = "Light",
range = 4,
brightness = 5
},
{
rotation = {
0,
0,
90,
0
},
parentNode = "light1",
class = "Particle",
name = "particle",
particleSystem = "ice_guardian"
}
}
}
- Zo Kath Ra
- Posts: 937
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Ask a simple question, get a simple answer
I don't understand why people never post the actual error message.
In this case, something about Light.lua
So let's search your code for the string "light"
Code: Select all
{
name = "light",
offset = {
0,
0.5,
0.25,
0
},
color = {
0.5,
0.8,
1.7,
0
},
parentNode = "light1",
fillLight = true,
class = "Light",
range = 4,
brightness = 5
},
Re: Ask a simple question, get a simple answer
Ok, so you have to copy the monstercode straight from the individual monster files, and not from the bigass defaultassets notepad file.
woops!
It works now.
woops!
It works now.
Re: Ask a simple question, get a simple answer
What I mostly do is simply put the note on the altar, then disable the model and the item component.Eleven Warrior wrote: ↑Mon Oct 21, 2019 10:43 am How do I spawn a note or scroll onto a altar with a message on either one of them ty
I can do this but not sure about the add message bitCode: Select all
spawn("note",14,28,1,3,"note_2") g1_table_3.surface:addItem(note_2.item)
This way the note is already there with the correct text, it's just invisible and can not be taken by accident.
Code: Select all
function note()
note_1.item:enable()
note_1.model:enable()
end
It's way simpler and faster than actually spawning in items.
Re: Ask a simple question, get a simple answer
hey
Is that possible to gain a spell while using skillpoint on a trait? If the player choose a spell cast class.
I want to gain customs spells if I use skillpoints in a skill, let's say herborist.
Is that possible to gain a spell while using skillpoint on a trait? If the player choose a spell cast class.
I want to gain customs spells if I use skillpoints in a skill, let's say herborist.