Author Topic: A complete beginner with eyes bigger than belly  (Read 1301 times)

Legacy_Ribouldingue

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« on: January 31, 2013, 06:23:07 pm »


               Hey everyone,

As the title says, I'm a complete beginner. It's been two weeks now since I've started trying to script an idea but can't manage to get it to work the way I'd like it to. And I know it's been absurd to start with something complex, well it is for me, but well I'm stubborn maybe.

So here is the idea: A rope-activated elevator made with placeables on a walkable floor.

So my first problem is with pits made with triggers. So far they work properly with PC and creatures. But there are several things I can't set to work with them. Knowing these aren't traps cause any character can obviously see them.

1. I'd like creatures to naturally avoid them, meaning they could fall when they step on them during fights for example, but all the things I could find about it were far beyond my understanding and abilities, so I wonder if there's even a relatively simple way.

2. I'd like the target to fall on the wooden platform wherever it is, I've set local variables for the area height on waypoints (used for ports when the elevator's rope is used too) and for the elevator height on its last placeable spawn, now the point is I just don't manage to make the value comparison.

Now with the lift itself, I've set a local variable on a trigger around the wooden platform but even if the onuse script of the rope checks for it, I can't manage to port anything but PC. No need to say I'm not happy with the fact that an item that would be dropped on the platform or a hostile or not creature that would follow the PC on it would be both left behind. I've set object otarget as either oPC, ocreature or oitem and copied the action lines for each of them but still only the PC is ported.

I can't post my scripts here cause I've recently destroyed them all for a fresh new start, but I'll gladly rewrite them if you wish.

Sorry if these questions can sound obvious to most of you.

By the way if anyone is willing to go for a new adventure, I'll gladly accept as long as he or she takes care of the script. Do I have to laugh here?

Anyway thanks for reading and thanks for your time!

Ribouldingue.
               
               

               


                     Modifié par Ribouldingue, 31 janvier 2013 - 06:23 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #1 on: January 31, 2013, 08:20:51 pm »


               Coding monsters to avoid aoes is very complex and fairly expensive in terms of cpu. That's doubtless part of the reason bioware didn't do it for NWN. You also lack the engine-level access that they have, making this even more difficult. It'd require regular checks when a creature got too close to a forbidden zone, and then edits to the ai to path it around that zone and set it on an enemy it can reach. Is it strictly possible? Yes. Is it a productive use of time? Not remotely, since it requires an enormous amount of work, for very little gain. Don't be too surprised if no one wants to tackle this.

You may want to consider simpler alternatives, like a chance of monsters getting ported to the pit area if they approach the edge, which could be done easily and cheaply, with an on-enter trigger.

Funky
               
               

               
            

Legacy_Ribouldingue

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #2 on: January 31, 2013, 08:32:33 pm »


               Thanks Funky.

Now I know it's almost pointless to try, especially for me, I'll just live with it.

But what about the two other points? Am I wasting my time too?

Ribouldingue.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #3 on: January 31, 2013, 09:30:18 pm »


               

By the way if anyone is willing to go for a new adventure, I'll gladly accept as long as he or she takes care of the script.


You should join us for the Adventure Building Challenge and try to do a module with minimal scripting. Or maybe there is someone willing to team up with you, although I don't recommend keeping your hopes up for a scripter to sign on for taking orders. Them scripters are a highfalutant (flatulant?) bunch.

A one month mini module while working in parallel with a bunch of us can be good for someone starting out. Take on a simple project. Build it. Have fun. Learn as you go, and be ready for a more complex project after its done.

Taking on the projects you list above are obviously beyond your ability. You'll be able to tackle this stuff in time. But you have to learn to walk first.

Come and join us. We'll all be together. We can help each other out. Follow each other's projects. Learn from one another etc...
               
               

               


                     Modifié par henesua, 31 janvier 2013 - 09:31 .
                     
                  


            

Legacy_Ribouldingue

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #4 on: January 31, 2013, 09:51:31 pm »


               It's hard to resist such a wise and courteous speech henesua.

I indeed should learn basics before all, hence the title of the topic, but well that's just the way I am, I'll keep on trying as I am right now even if I'll obviously leave some ideas behind.

And I will join with pleasure the Adventure Building Challenge, cause well you're deeply right.

By the way, I was only kidding about getting someone to script for me.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #5 on: January 31, 2013, 09:57:52 pm »


               That made my day. Its wonderful to have people join the challenge. The more modules we put out to play the better in my view. And its addictive!
               
               

               
            

Legacy_Ribouldingue

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #6 on: January 31, 2013, 10:15:29 pm »


               You suddenly sound very confident, don't you?

I'm very far from being sure that I'm able to build anything of interest in one month right now.

To be honest I've cried when I've read the adventure building challenge. But well I told you I'd join...
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #7 on: January 31, 2013, 10:47:26 pm »


               <offering free advice...>

Hah! Don't give up the ship! Keep your head down and your powder dry! The sky *isn't* falling!

(whew. I feel a lot better after saying all that ;-)

Just pick some simple idea and work toward it :-)
We'll help. And I mean that.
You have found just about the noob-friendliest community on the Net.

Or throw caution to the winds and lay out sixty areas with planar gates and undead putty-tats and blancmange <oi. i thought we'd gotten away from the blancmange>
(its sneaking up on Rib...) <we should run>
(with ya, faithful familiar)

Hey! Look! Over there! <go!>
(going! gone!)

<...that's worth every penny>
               
               

               
            

Legacy_PLUSH HYENA of DOOM

  • Hero Member
  • *****
  • Posts: 995
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #8 on: January 31, 2013, 11:29:35 pm »


               What? You think you can mention Blancmange and get away with it?
Plush Eyes of Doom are everywhere... watching... listening... um... EARS! Plush EARS of Doom then... and eyes too. Obviously. All attached to the snarling, rabid thing lurking in the bush muttering about Spleens.
And speaking as someone who has been Module Building for years (like ears but longer), I have NEVER attempted a simple little level 1 character Module open to any player. Not ever. So nobody, however new, is likely to mess up on this challenge as much as me.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #9 on: January 31, 2013, 11:45:26 pm »


               <nodding sagely...>

Yup yup. The Plush One can do it better than anyone!

(Was that *Kate* Bush Plushie was hanging with, Bother? Brings new understanding to "Hounds of Love", don't it?) <hard telling, no knowing, boss>

<...while lifting his robes and skedaddling>
               
               

               
            

Legacy_Ribouldingue

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #10 on: February 01, 2013, 12:11:04 am »


               *scratches his head*
               
               

               
            

Legacy_Ribouldingue

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #11 on: February 01, 2013, 01:01:32 am »


               Oh oh... I think I get this one to work just fine after a few tests...

void main()
{
    effect eDamage;
    object oTarget;

    // Get the creature who triggered this event.
    object oAll = GetEnteringObject();

    //Checks positions
    oTarget = GetNearestObjectByTag("Ropedtc001");
    int a = GetLocalInt(oTarget, "LV_DTC_Areaheight");
    oTarget = GetObjectByTag("DTC_Southernlift_03");
    int b = GetLocalInt(oTarget, "LV_DTC_Southernliftheight");

    //If falling from above the lift
    if (a>'B)'
        {
        // Find the location to which to teleport.
        oTarget = GetObjectByTag("DTC_Southernlift_03");
        // Confirms the creature falls on the lift.
        SetLocalInt(oAll, "LV_DTC_isonthelift", 1);
        // Teleport the creature.
        AssignCommand(oAll, ClearAllActions());
        AssignCommand(oAll, JumpToObject(oTarget));
        // Have the creature perform a sequence of actions.
        AssignCommand(oAll, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0, 4.0));
        // Cause damage.
        oTarget = GetNearestObjectByTag("Ropedtc001");
        int a = GetLocalInt(oTarget, "LV_DTC_Areaheight");
        oTarget = GetObjectByTag("DTC_Southernlift_03");
        int b = GetLocalInt(oTarget, "LV_DTC_Southernliftheight");
        eDamage = EffectDamage(d4(a-'B)', DAMAGE_TYPE_BLUDGEONING);
        DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oAll));
        }

    //If falling from under the lift
    else
        {
        // Ports to the bottom of the pit
        oTarget = GetWaypointByTag("WP_DTC_LP_3801s_down");
        AssignCommand(oAll, ClearAllActions());
        AssignCommand(oAll, JumpToObject(oTarget));
        AssignCommand(oAll, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0, 4.0));
        // Cause damage.
        oTarget = GetNearestObjectByTag("Ropedtc001");
        int a = GetLocalInt(oTarget, "LV_DTC_Areaheight");
        eDamage = EffectDamage(d4(a), DAMAGE_TYPE_BLUDGEONING);
        DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oAll));
        }
}

Is there anything wrong with it? Well excepts it still doesn't work for items but I'll try to figure that out later.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #12 on: February 01, 2013, 04:16:44 am »


               1 Placables can not be moved.  They can be rotated but not moved. If you want to move a placable you have to destroy the old one then create a new one or create several placables and apply  effects to them to give the appearance of movement.  

2 JumpToObject places you in front of the object not on the object.  

3 NWN placables do not create a walk mesh, they only cut holes in the current one. ( someone can correct me on this one if im wrong)  

If I have the jist of what you are tring to do.  People have been tring to do the same thing for years with little sucess.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #13 on: February 01, 2013, 04:38:01 am »


               <examining the convoluted...>

Actually...

I can see a way to produce this illusion... Something similar to a vertical version of OTR's mine car ride.

R isn't actually trying to move the walkmesh, at least in this script.

So, what would *I* need to pull this off?

A "lift" tile group with a seemingly bottomless hole down & up.
A lift placeable with a long off2on anim going from way down to way up. (And vice versa).
A duplicate tile group with the lift fixed and *wall* placeable animated in opposite fashion (so it looks like the walls are going down/lift up.

Then, perhaps FB's climbing anims.

So PC starts climbing rope. Shift to interior of shaft with PC hanging on rope, lift placeable rising. Track the height variables (time?). PC fails, falls. Tport him to static lift inside placeable shaft. Or shaft bottom, if lift has gone past.

It'd be complex, but I think it could be done.

But, yeah. No moving placebles. And no walkmesh above walkmesh.

<...workings of a promising script>
               
               

               
            

Legacy_Highv Priest

  • Full Member
  • ***
  • Posts: 170
  • Karma: +0/-0
A complete beginner with eyes bigger than belly
« Reply #14 on: February 01, 2013, 05:04:20 am »


               On the basis of having AI avoid AoE's there is actually a very easy and cheap way to do this(in terms of CPU). I simply set a trigger to be created at the spot of the AoE's creation, with the trigger acting as an event for the AI to avoid that spot. The AI enters the trigger first, gets the warning that the AoE is nearby, Sets it's AI to low, Has setcommandable set to FALSE, runs to EITHER the left or right for the exact size of the AoE and then runs straight toward the player. Players do the exact same thing. They see an AoE and run around it in much the same way that the AI does and checks in profiler show this is very inexpensive. In the case that a player creates multiple AoE's to box the AI, it just has them performing a tron style box run(which is -still- not using much in CPU), which is quite comical.