Author Topic: Help Topic  (Read 8703 times)

Offline Elessar Telrunya

  • Hero Member
  • *****
  • Posts: 2095
    • View Profile
Help Topic
« on: April 02, 2005, 11:46:56 AM »
Post Scripting/Toolset issues in which you need assisstance for here. They'll likely be answered not long after.

My issue atm:
Quote
Okay, this is a problem thats probably caused due to me being stupid. I tried to follow 420's directions on the new aoe and the scripts compile and yadyada, but how do I give a creature the ability to use the aoe?

i posted this on arivs forums but no one's replied yet.


-Lord Elessar

Offline Elessar Telrunya

  • Hero Member
  • *****
  • Posts: 2095
    • View Profile
Help Topic
« Reply #1 on: April 02, 2005, 02:42:16 PM »
okay, i now have a bigger issue- my dm tool script isnt calling the conversation up properly, and i'm not sure why. here is the script
Quote
void main()
{
object oPC;
oPC = GetItemActivator();
object oCoruscatus = GetLocalObject(oPC, "Coruscatus");

location locCorsucatus = GetLocation(oCoruscatus);
effect eVFX = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);

ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVFX, locCorsucatus);

DestroyObject(oCoruscatus);


object oTarget;
object oSpawn;
location lTarget;
oPC = GetItemActivator();

oTarget = GetItemActivatedTarget();

SetLocalObject(oPC, "dmtooltarget", oTarget);

lTarget = GetLocation(oPC);

string sSpawn = "thecoruscatus";
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "thecoruscatus", lTarget, FALSE, sSpawn);

ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVFX, locCorsucatus);
//The PC will technically start a conversation with himself
//You should add some odd little sound to the first line in the
//conversation file, or the PC will give his normal voicegreeting.

object oSpawn2 = GetObjectByTag("thecoruscatus");
SetLocalObject(oPC, "Coruscatus", oSpawn2);



object oItem = GetItemActivated();

if(oTarget == oPC)
      {
      DelayCommand(1.5, AssignCommand(GetObjectByTag("thecoruscatus"), ActionStartConversation(oPC, "dmtoolself")));
      }

else if(GetIsPC(oTarget))
       {
       DelayCommand(1.5, AssignCommand(GetObjectByTag("thecoruscatus"), ActionStartConversation(oPC, "dmtoolplayer")));
       }
else
      {
      DelayCommand(1.5, AssignCommand(GetObjectByTag("thecoruscatus"), ActionStartConversation(oPC, "dmtoolobject")));
      }


}

note: this is what it looks like now after several attempts to fix it



-Lord Elessar
« Last Edit: April 02, 2005, 02:42:30 PM by Lord Elessar »

Offline Mo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
    • MSN Messenger - cochy@msn.com
    • View Profile
    • http://lucidmagic.net
    • Email
Help Topic
« Reply #2 on: April 02, 2005, 03:32:39 PM »
Well...for one it would help if you stated a more detailed problem than "script isnt calling the conversation up properly" .  What exactly is happening or not happening.

Second at first glance I'm confused with

Quote
oPC = GetItemActivator();
object oCoruscatus = GetLocalObject(oPC, "Coruscatus");

GetItemActivator() can only be used in the OnItemActivated module event.
What script does all this code belong to?

Also I don't see where you SetLocalObject(oPC, "Coruscatus")...would help to know whats going on.

Offline Elessar Telrunya

  • Hero Member
  • *****
  • Posts: 2095
    • View Profile
Help Topic
« Reply #3 on: April 02, 2005, 03:56:30 PM »
Quote
Well...for one it would help if you stated a more detailed problem than "script isnt calling the conversation up properly" .  What exactly is happening or not happening.
[snapback]20719[/snapback]
what is happening is i use it. it summons the coruscatus, and then after the delay time is up, the coruscatus turns as if to go into conversation, but the conversation doesn't pop up.
Quote
Second at first glance I'm confused with
GetItemActivator() can only be used in the OnItemActivated module event.
What script does all this code belong to?
[snapback]20719[/snapback]
its a unique power script so yes it is allowed to be there
Quote
Also I don't see where you SetLocalObject(oPC, "Coruscatus")...would help to know whats going on.
[snapback]20719[/snapback]
this is located in this part of the script
Quote
//The PC will technically start a conversation with himself
//You should add some odd little sound to the first line in the
//conversation file, or the PC will give his normal voicegreeting.

object oSpawn2 = GetObjectByTag("thecoruscatus");
SetLocalObject(oPC, "Coruscatus", oSpawn2);


I believe it was working fine until I added the lines up top to destroy a coruscatus if one is already summoned.


-Lord Elessar

Offline Mo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
    • MSN Messenger - cochy@msn.com
    • View Profile
    • http://lucidmagic.net
    • Email
Help Topic
« Reply #4 on: April 02, 2005, 04:10:31 PM »
Ahh ok...

Well comment out that part..try again and make sure that there problem is there

Offline CleTus

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • http://
Help Topic
« Reply #5 on: April 02, 2005, 04:15:37 PM »
It looks like you're getting the object then setting it. I dun think it works like that.
GIT-R-DONE!

Light travels faster than sound. That is why some people appear bright until you hear them speak.

Offline Elessar Telrunya

  • Hero Member
  • *****
  • Posts: 2095
    • View Profile
Help Topic
« Reply #6 on: April 02, 2005, 04:18:18 PM »
trust me, i tried about five times, but sure, as soon as i get back on teh upstairs com i'll try again.


-Lord Elessar

PS: this is completely off topic, but you know how under your name(mo) it says "master of the arcane" and under mel's it says "mel" under mort's it says "vampiress", is that an admin/gmod option only or can everyone do that?(just been thinkin botu that hehe)

Offline Mo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
    • MSN Messenger - cochy@msn.com
    • View Profile
    • http://lucidmagic.net
    • Email
Help Topic
« Reply #7 on: April 02, 2005, 04:19:23 PM »
He GetLocalObject first because if he used the item twice quickly there would be a localobject already created ...so he'd destroy it...

I would do it this way

if (GetLocalObject(blah) != OBJECT_INVALID) {

DestroyObject(blah);

}

always good to use conditional scripting so that code doesn't run that doesn't need to...
Plus destroying an OBJECT_INVALID  sounds very buggy.
« Last Edit: April 02, 2005, 04:20:12 PM by Mo »

Offline Elessar Telrunya

  • Hero Member
  • *****
  • Posts: 2095
    • View Profile
Help Topic
« Reply #8 on: April 02, 2005, 06:01:31 PM »
okay i've figured it out. it was encountering an error in the new tag so i ditched giving it a new tag and filled in its origanal tag.


-Lord Elessar