It just seems that I'm forever getting absolutely nowhere in trying to get this thing right!
The last post I made a while back on this subject, was - Here!
A very helpful person gave me a script there, which I have found rather useful indeed!
But there is still a part of it which isn't working correctly for me!
Here is the script again, but this time after I have modified it a bit.
void main()
{
// Place this script on the Airship's OnHeartbeat
//
// AIRSHIP FIRE VARIABLE - airshipstart
//
// At some point, when the airship is ready to begin moving upward,
// change the airshipstart variable from 0 to something else.
//
// example - SetLocalInt(GetModule(), "airshipstart", 100);
//
// Once it's anything but 0, the script below will begin to fire.
//
object oMod = GetModule();
int nNth = GetLocalInt(GetModule(), "airshipup");
// Checks to see if script should begin to fire & airship to rise upward
if (GetLocalInt(GetModule(), "airshipstart") == 6) return;
// HB counter to destroy & create airship
nNth++;
if (GetLocalInt(GetModule(), "airshipup") == 0)
{
DestroyObject(GetObjectByTag("Airship1"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.0;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship002", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 3)
{
DestroyObject(GetObjectByTag("Airship2"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.5;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship003", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 4)
{
DestroyObject(GetObjectByTag("Airship3"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.10;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship004", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 5)
{
DestroyObject(GetObjectByTag("Airship4"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.15;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship005", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 6)
{
DestroyObject(GetObjectByTag("Airship5"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.20;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship006", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 7)
{
DestroyObject(GetObjectByTag("Airship6"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.25;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship007", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 8)
{
DestroyObject(GetObjectByTag("Airship7"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.30;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship008", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 9)
{
DestroyObject(GetObjectByTag("Airship8"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.35;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship009", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 10)
{
DestroyObject(GetObjectByTag("Airship9"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.40;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship010", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 11)
{
DestroyObject(GetObjectByTag("Airship10"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.45;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship011", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 12)
{
DestroyObject(GetObjectByTag("Airship11"));
location lLoc1 = GetLocation(OBJECT_SELF);
float fFacing = GetFacing(OBJECT_SELF);
vector vPos1 = GetPositionFromLocation(lLoc1);
vPos1.z += 3.50;
lLoc1 = Location(GetArea(OBJECT_SELF), vPos1, fFacing);
CreateObject(OBJECT_TYPE_PLACEABLE, "airship012", lLoc1);
}
if (GetLocalInt(GetModule(), "airshipup") == 13)
{
// END AIRSHIP JOURNEY
DestroyObject(GetObjectByTag("Airship12"));
SetLocalInt(GetModule(), "airshipstart", 9000);
}
}
Also, for a completely different change, I made a very rough and completely simple clip to show what is happening with my airship, which may or may not be of any help, but anyway....... it's a very quick clip, so here we go!
Airship Rises (Click Here)
There are a still a couple of issues I have here, and I'm not completely sure how to correct them.
So I'm hoping someone might come along and help me out a bit please?
1) That is not the required height that I wish my airship to go up to!
Does this require more of an extension to my airship script, as I have edited the original which was made for me, and played around with the numbers on there, changing them around, but yet I cannot get my airship to go up any higher than you have seen in my clip.
What else could be added to get my desired script to work?
It's quite long as it is. An extension will obviously make it even looooonnnnggeeeeerrrrr!! *sigh!*
2) Why doesn't the last copy of the airship STAY.... destroyed as I have tried to show in the script??
The airship is supposed to RISE UP..... then at a certain point, its is supppsoed to disappear, and you don't see the last one! That is what the "destroy airship" is SUPPOSED..... to do!! Or at least I THOUGHT it was!
Is there a way to create this desired effect please, and with the one in my first 1 question too??
Modifié par MissJaded, 02 novembre 2010 - 01:24 .





Retour en haut






