Page 81 of 400
Re: Ask a simple question, get a simple answer
Posted: Sun Aug 02, 2015 11:21 pm
by THOM
Okay, some thing are mixed up right now.
minmay, in your code, you close a door named "dungeon_secret_door_THOM_a_"
I want to close all doors named "dungeon_secret_door_THOM_a_1" or "dungeon_secret_door_THOM_a_22" or "dungeon_secret_door_THOM_a_104"
My mistake: I am not looking for e.name but for e.id !
But I still do not know how to placehold the numbers...
Re: Ask a simple question, get a simple answer
Posted: Sun Aug 02, 2015 11:25 pm
by AndakRainor
Then just replace name with id in minmay's code and it should work.
Re: Ask a simple question, get a simple answer
Posted: Sun Aug 02, 2015 11:33 pm
by THOM
true
HOOORAYYYY!!!

Re: Ask a simple question, get a simple answer
Posted: Mon Aug 03, 2015 12:40 am
by minmay
THOM wrote:minmay, in your code, you close a door named "dungeon_secret_door_THOM_a_"
I want to close all doors named "dungeon_secret_door_THOM_a_1" or "dungeon_secret_door_THOM_a_22" or "dungeon_secret_door_THOM_a_104"
The code opens any door with a name
containing "dungeon_secret_door_THOM_a_" which includes the strings you mentioned. Do you have a religious objection to reading the string library tutorial or something?
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 03, 2015 12:50 am
by Isaac
@Thom: Is it that you only want those specific doors; and not all doors?
(At first reading, I took it to mean all doors.)
** Is "dungeon_secret_door_THOM_a" the asset name? (...for a set of doors?)
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 03, 2015 1:25 am
by THOM
Well, my problem is solved, that's the most important thing.
@Isaac: I have a mass of doors, that have to open and close at specific moments. "dungeon_secret_door_THOM_a_[number]" is the id I have given to some of these doors, others have "dungeon_secret_door_THOM_b_[number]" or something like that.
So I was trying to find a way to open all doors named xy, and close all doors named yz in one moment. And I have a way, now...
@minmay: yes, your code is searching for doors which ids contains that specific string. Shame on me - I missed the point, what "find" meant in this context. I am really a silly guy and it is absolutely correct, that you poured sarcasms over me. That scripting newbies annoying professionals and do not penetrate every coding-mystery at the first glance is really unbearable. Sorry, it wasn't my intention to disturb you in your ivory tower.
But, sorry for now - must go to church.
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 03, 2015 1:43 am
by minmay
The StringLibraryTutorial page that AndakRainor linked to tells you exactly what the find() method does. It's not a mystery.
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 03, 2015 2:01 am
by THOM
well, for me it is. already before AndakRainor recommended this site to me, I started reading it - and failed to find a solution. Most of that what is written there is very desorientating for me.
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 03, 2015 8:41 pm
by Drakkan
I hope, this could be easy - I need following object to be non-walkable like real wall and also it should display itself as a regular wall on the automap. What I need to define here ?
edit: the same goes for standrad castle_wall object
Code: Select all
defineObject{
name = "castle_wall_outside_01",
baseObject = "base_wall",
components = {
{
class = "Model",
model = "assets/models/env/castle_outside_wall_01.fbx",
dissolveStart = 6,
dissolveEnd = 8,
staticShadow = true,
},
{
class = "Occluder",
model = "assets/models/env/castle_wall_01_occluder.fbx",
},
},
minimalSaveState = true,
}
Re: Ask a simple question, get a simple answer
Posted: Mon Aug 03, 2015 9:37 pm
by THOM
Add the components
Code: Select all
{
class = "ProjectileCollider",
},
{
class = "Door",
hitSound = "impact_blunt",
},
and the definition