Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
There doesn't seem to be anything wrong with that then. The party and the wall object are both facing East, and both on the same tile.
It is easy to reverse the model facing (in Blender), and have a wall object look correct when really on a different tile than it seems.
It is easy to reverse the model facing (in Blender), and have a wall object look correct when really on a different tile than it seems.
Re: Ask a simple question, get a simple answer
I think I have used a flat wall model for this, and resized it in gmt, don't remember why.
I never saw this "issue" when I tested the object.
Well, I have try to add self.go.projectilecollider:enable() and disable() into the object's controller definition but that doesn't seems to work, then I have desactivated the projectile collider directly in the editor.
This works, except you cannot throw an item on the mouse pointer when you are one square back, in front of the wall. But a throwing weapon can be thrown when placed on the hands. But this doesnt bother.
I never saw this "issue" when I tested the object.
Well, I have try to add self.go.projectilecollider:enable() and disable() into the object's controller definition but that doesn't seems to work, then I have desactivated the projectile collider directly in the editor.
This works, except you cannot throw an item on the mouse pointer when you are one square back, in front of the wall. But a throwing weapon can be thrown when placed on the hands. But this doesnt bother.
Re: Ask a simple question, get a simple answer
Upload the model, and I'll look at it.
Re: Ask a simple question, get a simple answer
This happens because it's marked as a secret door. If you remove secretDoor = true from the definition, you'll be able to throw items through it using the mouse.bongobeat wrote:This works, except you cannot throw an item on the mouse pointer when you are one square back, in front of the wall. But a throwing weapon can be thrown when placed on the hands. But this doesnt bother.
(The only other effect of secretDoor is that it changes how the door is displayed on the automap.)
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
Question: I want to set up the following. I want a (an event, level up in this case) to activate a teleporter. This teleporter is set to teleport an object (a chest with contents for instance from a room nearby) to where the party is. how do I tell the teleporter it should teleport its stuff to where the party is? Or Am I making this overly difficult and is there an easier way?
Re: Ask a simple question, get a simple answer
The problem is: what do you mean by "telepeort to where the party is"? If you teleport stuff on the tile in front of the party (which would be possible with some tweaks) what happens, if this tile is a wall? Or a pit?
Of course you could teleport the stuff on the tile the party is on, but that could mean, that the player oversees it.
Thats why stuff, that comes as a revard for something, usually appears on a certain spot (an alvove, an altar...) or in the inventory/mouspointer of the party...
Of course you could teleport the stuff on the tile the party is on, but that could mean, that the player oversees it.
Thats why stuff, that comes as a revard for something, usually appears on a certain spot (an alvove, an altar...) or in the inventory/mouspointer of the party...
- Zo Kath Ra
- Posts: 937
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Ask a simple question, get a simple answer
1) Put a teleporter on the same tile as the chest.kelly1111 wrote:Question: I want to set up the following. I want a (an event, level up in this case) to activate a teleporter. This teleporter is set to teleport an object (a chest with contents for instance from a room nearby) to where the party is. how do I tell the teleporter it should teleport its stuff to where the party is? Or Am I making this overly difficult and is there an easier way?
2) Deactivate its "teleporter" component.
3) Optionally, remove all "triggeredBy" check marks, except "triggeredByItem".
4) Create script_entity_1 with this function:
Code: Select all
function telep()
teleporter_1.teleporter:setTeleportTarget(party.level, party.x, party.y, party.elevation)
teleporter_1.teleporter:enable()
end
Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Party",
onLevelUp = function(self, champion)
script_entity_1.script:telep()
end
}
}
}
Problem:
Only the rock is teleported, the chest stays where it is.
And you can't pick up the rock.
Solution:
Don't use a teleporter.
Code: Select all
function telep()
chest_1:setPosition(party.x, party.y, chest_1.facing, party.elevation, party.level)
end
The chest is now on the same tile as the party, but chests aren't supposed to be walkable.
You can step off the tile with the chest, but if the chest has the wrong orientation, you won't be able to open it.
(for example, if it's facing a wall)
Re: Ask a simple question, get a simple answer
What happens to the chest when it's emptied?kelly1111 wrote:Question: I want to set up the following. I want a (an event, level up in this case) to activate a teleporter. This teleporter is set to teleport an object (a chest with contents for instance from a room nearby) to where the party is. how do I tell the teleporter it should teleport its stuff to where the party is? Or Am I making this overly difficult and is there an easier way?
If it appears out of nowhere, arbitrarily blocking wherever the party is facing at the moment... it could permanently block a door or hallway.
Also, what happens if they are facing a wall when they get the XP, or if they are falling at the time?
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Ask a simple question, get a simple answer
Maybe a wooden box would be less dangerous to handle
also, for the visual, you could spawn a "teleportation_effect" at the same position.
also, for the visual, you could spawn a "teleportation_effect" at the same position.
Re: Ask a simple question, get a simple answer
^^Agreed, teleporting a wooden box (or one that looks a bit like a chest? - of which there are plenty floating around) would be easiest.AndakRainor wrote:Maybe a wooden box would be less dangerous to handle
also, for the visual, you could spawn a "teleportation_effect" at the same position.
Have you considered teleporting the party to a 'level up / treasure area' instead of the other way around - again, a lot less messy
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)