Jump to content

My BIG explosion touched... only me?


Vortaka

Recommended Posts

Well, the only thing that doesn't work, is this code...

	set rContainer to GetContainer
if JessiREF.IsKiller rContainer
ShowMessage AbilityWellRestedStartMsg
endif

I kept it simple... I tried to use the console to help me see what was wrong... But it tells me that JessiREF is not an object reference (or something around those lines).

 

I can tell you that rContainer = the hex value of the ant... But the reference of Jessi (JessiREF) doesn't seems to work... If I put player.iskiller (hex value of the ant) it will return 0 since I didn't kill it... But I am not sure why it doesn't work for my followers...

 

Vortaka

Link to comment
Share on other sites

Awesome, I'm really glad to hear that you've got it working now. What turned out to be the problem?

 

You've got IsKiller backwards - you want to use "rContainer.IsKiller JessiREF". Looks like the Wiki had its example backwards - I've fixed that now though.

 

The reason why the experience is only applied will be because you've called PlaceAtMe on the player. You'll want to call it on "JessiREF" instead.

 

Cipscis

Link to comment
Share on other sites

It seems my latest change screw up the entire thing... Back to the basic!

 

What troubles me mostly, is that it works once and only once... aka I get 1 xp and 1 showmessage on the first ant I kill (I'll probably try without the rcontainer.iskilled condition, but I doubt it will work!)... But it doesn't repeat itself... I can tell you the other script work fine... I see showmessage all over, always returning one after the other (as at should be!).

 

The AoE spell and script work... Everytime I kill an ant, it gives it the token... (I wrote a conditionif (IsActor == 1 && GetDead == 1 && GetItemCount KillerToken == 0). So, if it's an actor, is dead and doesn't have the KillerToken, give it... That works, every dead has a token... What doesn't work is the OnAdd. Like said before, it gives it to me 1 time only...).

 

Vortaka

 

After some tests: The conditions, if rContainer.IsKiller JessiREF seems to be the problem... Is there a way to "reset" it?

Link to comment
Share on other sites

ref rContainer

Begin OnAdd
set rContainer to GetContainer

if ( rContainer.IsKiller JessiREF )
ShowMessage TestID
RewardXP 1
endif

if ( rContainer.IsKiller LoxKelseyREF )
ShowMessage TestID
RewardXP 1
endif

The be sure I'm not missing anything, I've decided to post my code... I tried it without the conditions (if) and it works... But, as soon as I add the conditions, it just gives me the add once before it halts as you say...

 

I do not know where to get the EditorRefID but the teleportation script, on both Jessi and Kelsey, points to the 2 REF in the code...

Vortaka

Link to comment
Share on other sites

Those two conditions are mutually exclusive, so you could use an "elseif[/url] statement instead of two "if" statements. However, both "if" statements contain the same code so you could just us a logical OR (" || ") instead:

ref rContainer

Begin OnAdd
set rContainer to GetContainer

if ( rContainer.IsKiller JessiREF ) || ( rContainer.IsKiller LoxKelseyREF )
ShowMessage TestID
RewardXP 1
endif

That code looks just fine to me, so I'm not sure what the problem is. If I'm understanding you correctly, the first Actor killed by one of your followers acts correctly and you receive 1 experience, but all subsequent Actors killed by your followers don't cause this. Is that correct?

 

Cipscis

Link to comment
Share on other sites

Yep, that's exactly right! So, let's make an example... I'm just outside Megaton and I placeatme c8063 (ants... I remember the codes by heart now). So a ant appears... I run away and they kill it... I get 1xp (and my message). If I add any other, they don't give me a thing... If I add 5 the first time, only one gives me the thing... I'll try the logical "or" ("||") too... Hey, we never know!

 

Vortaka

 

P.S. If I do it without conditions, every kill gives me 1xp...

Link to comment
Share on other sites

Alright... Since I had so much problem with my scripts, I gave a look at Reneer's updated one... It's clearer... It's better and far less buggier!

 

The only thing that doesn't work now, is the addon script... It seems that the GetContainer function doesn't work properly... I get "00000000" for everyone... Me, my followers and everyone of those damn monsters...

 

Vortaka

 

P.S. Everything else works... And if I do not put a condition, it works just fine...

 

Addon:

 

I don't know what is wrong... I finally was able to understand how the console works. Click on the ant, type: IsKiller xxxxxxxx (the hex of the follower. Got it by clicking on it). And the ant was killed (1.00) by Jessi... Now, why doesn't the script work?

 

If I understand it right, the rContainer we got from GetContainer = the ant hex address right?

Link to comment
Share on other sites

Yeah, rContainer is set to the return value of GetContainer in the OnAdd block, so it should point to the RefID of the Actor which has the token in its inventory.

 

I would expect GetContainer to be functioning properly, as it's called in the OnAdd block, but if it's not then try using this instead:

ref rContainer

Begin OnAdd
set rContainer to GetContainer
End

Begin GameMode
if rContainer
	if rContainer.IsKiller JessiREF || rContainer.IsKiller LoxKelseyREF
		ShowMessage TestID
		RewardXP 1
	endif
endif
End

You'll obviously need to create another token - "HasBeenCheckedToken", and add it to your GetItemCount condition in the Effect Script.

 

Cipscis

Link to comment
Share on other sites

Hi... After hours of trials and errors, I did this simple code, and it didn't work...

scn KillerTokenAoEEffectScript

ref rContainer
Begin ScriptEffectStart
set rContainer to GetContainer

if (rContainer.IsKiller JessiREF)
ShowMessage TestID
elseif (rContainer.IsKiller LoxKelseyREF)
ShowMessage TestID2
endif

Now, I don't know about you... But I think my computer is laughing at me very hard! If I go check on the ants manually, I'll just be >>= 1.00 . The this is in the spell script (as noted)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...