Page 63 of 396
Re: Ask a simple question, get a simple answer
Posted: Sun May 03, 2015 12:59 pm
by Duncan1246
I want to use a scriptable wizard, but I wonder about 3 monster's actions which seems to be identical except the animation: "escape", "crystal" and "letter". I don't remenber how they are used in the main game (if they are...). Does anyone knows how wizard's brain select one of them (hardcoded or by additional script) and if animation is the only difference, what each one do?
Re: Ask a simple question, get a simple answer
Posted: Sun May 03, 2015 1:13 pm
by Dr.Disaster
Duncan1246 wrote:I want to use a scriptable wizard, but I wonder about 3 monster's actions which seems to be identical except the animation: "escape", "crystal" and "letter". I don't remenber how they are used in the main game (if they are...). Does anyone knows how wizard's brain select one of them (hardcoded or by additional script) and if animation is the only difference, what each one do?
These animations are used in the main campaign at several places for storytelling purposes when the party can / will run into the wizard. None of them is combat related so they can only be accessed by scripting. For example the letter deposite scene when the party enters Sleet Island the first time is executed by calling wizard_lake.brain:performAction("letter")
Re: Ask a simple question, get a simple answer
Posted: Sun May 03, 2015 4:31 pm
by Duncan1246
Dr.Disaster wrote:Duncan1246 wrote:I want to use a scriptable wizard, but I wonder about 3 monster's actions which seems to be identical except the animation: "escape", "crystal" and "letter". I don't remenber how they are used in the main game (if they are...). Does anyone knows how wizard's brain select one of them (hardcoded or by additional script) and if animation is the only difference, what each one do?
These animations are used in the main campaign at several places for storytelling purposes when the party can / will run into the wizard. None of them is combat related so they can only be accessed by scripting. For example the letter deposite scene when the party enters Sleet Island the first time is executed by calling wizard_lake.brain:performAction("letter")
Thanks! I remenber now the scene with the healing crystal where he disappears also. Therefore it has a very little interest in a new scenario.
Re: Ask a simple question, get a simple answer
Posted: Fri May 08, 2015 4:03 pm
by Duncan1246
Does somebody knows if it is possible to produce an horizontal light ray, like laser light, between two points? I needs a permanent light , not like a bolt. The only solution I have for the moment is a spawner associated with a timer with short interval and a blob, but I think it's an ugly solution
Re: Ask a simple question, get a simple answer
Posted: Fri May 08, 2015 5:02 pm
by minmay
The best approach to make something that looks like a laser would be to use a model and a texture. Look at the force field and pushable block floors in the standard assets for examples.
Re: Ask a simple question, get a simple answer
Posted: Fri May 08, 2015 5:53 pm
by Duncan1246
minmay wrote:The best approach to make something that looks like a laser would be to use a model and a texture. Look at the force field and pushable block floors in the standard assets for examples.
Yes, but how to realize the ray, in adding a tile model on each tile of the ray path?
Re: Ask a simple question, get a simple answer
Posted: Fri May 08, 2015 7:13 pm
by Isaac
Duncan1246 wrote:minmay wrote:The best approach to make something that looks like a laser would be to use a model and a texture. Look at the force field and pushable block floors in the standard assets for examples.
Yes, but how to realize the ray, in adding a tile model on each tile of the ray path?
I would model a ray that was several tiles long, and add it as a model component to the party when fired. With an offset & rotation that originates from whichever slot the champion occupies. The player probably won't often see it behind the target (when it clips), and in twisting hallways. You could also add a tiny bit of random rotation to the beam model for every attack, and that could also help if the weapon has the rapid multi-shot firearm special attack. The randomness might also be increased the farther away the target is... simulating [totally faking] the PC's poor firearm accuracy at range.
Re: Ask a simple question, get a simple answer
Posted: Fri May 08, 2015 8:44 pm
by minmay
Duncan1246 wrote:minmay wrote:The best approach to make something that looks like a laser would be to use a model and a texture. Look at the force field and pushable block floors in the standard assets for examples.
Yes, but how to realize the ray, in adding a tile model on each tile of the ray path?
Well, there are basically three options.
1. put the entire ray in one model, and if you want to change the size or add a curve or whatever you have to make a new model. This option is crap in 99.99% of cases.
2. build the ray out of segments of constant length using setWorldPosition(), allowing you to adjust the size and add curves with setWorldRotation() or setWorldRotationAngles(), but only at certain resolutions (you could make several segment models of different length). Since too many segments would result in performance issues, if you want a beam that, say, smoothly increases in size, this method doesn't work well.
3. have just one model as in 1, but use setWorldRotation() to modify the transformation matrix to get arbitrary rotation and size, and MaterialEx:setTexcoordScaleOffset() to adjust the texture alignment each frame to compensate. (You could use an animation to transform the beam as well but since you are scaling the texture anyway you might as well just compute the transformation matrix for each frame yourself.) Very easy to make variable-length or variable-width beams, and you can still use segments to make curves. However, every segment of unique length/width would require a unique material so that you can scale the texture for each one correctly. The world transformation matrix applies to stuff like particle emitter shapes too, so you don't have to worry about adjusting those. Also, this method involves actual math, which a lot of modders are scared of.
Option 2 is probably what you wanted.
Isaac wrote:I would model a ray that was several tiles long, and add it as a model component to the party when fired. With an offset & rotation that originates from whichever slot the champion occupies.[totally faking] the PC's poor firearm accuracy at range.
so what do you suggest Duncan1246 does when the party uses free look? this sounds like a really awful approach compared to just making a new object
Re: Ask a simple question, get a simple answer
Posted: Fri May 08, 2015 8:51 pm
by Isaac
minmay wrote:Isaac wrote:I would model a ray that was several tiles long, and add it as a model component to the party when fired. With an offset & rotation that originates from whichever slot the champion occupies.[totally faking] the PC's poor firearm accuracy at range.
so what do you suggest Duncan1246 does when the party uses free look? this sounds like a really awful approach compared to just making a new object
Is it possible to use free-Look while attacking?
(Obviously the idea was an on & off blink; possibly with a projectile pulse for effect ~which itself would have been issue with free look come to think of it.)
*Have I mistaken the subject; a laser. If the intent is not a laser blast, but is instead a slow moving beam spell ~that's different. In that particular case, option #3 makes for a versatile choice.
**Something like the warlock's spell in Myth2 could be really neat if the modder scripted the projectile to follow the heightmap.
https://youtu.be/Vnv_XE3m2X0?t=8m20s
(Watch the spellcaster in Black, on the left.)
Re: Ask a simple question, get a simple answer
Posted: Fri May 08, 2015 10:34 pm
by minmay
Isaac wrote:minmay wrote:Isaac wrote:I would model a ray that was several tiles long, and add it as a model component to the party when fired. With an offset & rotation that originates from whichever slot the champion occupies.[totally faking] the PC's poor firearm accuracy at range.
so what do you suggest Duncan1246 does when the party uses free look? this sounds like a really awful approach compared to just making a new object
Is it possible to use free-Look while attacking?
I assume Duncan1246 wanted to display the beam for more than a single frame. Even if they were okay with that, it'd still break if the party is turning.