Jump to content

WHATS WRONG WITH MY FIRST SCRIPT¿?


alexdeadite

Recommended Posts

SCN ACIDDisintegrationScript


Float Timer

Short DoOnce

Short IsPile


Begin ScriptEffectStart

set ObjectREF to GetOwnerLastTarget

SetCriticalStage DisintegrateStart

PMS ACIDFX

PMS ACIDcriticalFX

Set Timer to 7

Set DoOnce to 0

Set IsPile to 0

End


Begin ScriptEffectUpdate

If DoOnce == 0

If IsPile == 0

If Timer <= 6

ObjectREF AttachAshPile 2

Set IsPile to 1

EndIf

EndIf


If Timer <= 0

SetCriticalStage DisintegrateEnd

SMS ACIDFX

SMS ACIDcriticalFX

Set DoOnce to 1

EndIf

Set Timer to (Timer - GetSecondsPassed)

EndIf

Edited by alexdeadite
Link to comment
Share on other sites

Using code tags and proper indentation helps.

ScriptName ACIDDisintegrationScript
 
Float Timer
Short DoOnce
Short IsPile
 
Begin ScriptEffectStart
	SetCriticalStage DisintegrateStart
	PMS ACIDFX
	PMS ACIDcriticalFX
	Set Timer to 1.8
	Set DoOnce to 0
	Set IsPile to 0
End
 
Begin ScriptEffectUpdate
	If DoOnce == 0
		If IsPile == 0
			If Timer <= 0.5
				AttachAshPile 2
				Set IsPile to 1
			EndIf
		EndIf
	 
		If Timer <= 0 
			SetCriticalStage DisintegrateEnd
			SMS ACIDFX
			SMS ACIDcriticalFX
			Set DoOnce to 1
		EndIf
		Set Timer to (Timer - GetSecondsPassed)
	EndIf

Now it has become more apparent that you're missing an END statement for the ScriptEffectUpdate block.

Link to comment
Share on other sites

Using code tags and proper indentation helps.

ScriptName ACIDDisintegrationScript
 
Float Timer
Short DoOnce
Short IsPile
 
Begin ScriptEffectStart
	SetCriticalStage DisintegrateStart
	PMS ACIDFX
	PMS ACIDcriticalFX
	Set Timer to 1.8
	Set DoOnce to 0
	Set IsPile to 0
End
 
Begin ScriptEffectUpdate
	If DoOnce == 0
		If IsPile == 0
			If Timer <= 0.5
				AttachAshPile 2
				Set IsPile to 1
			EndIf
		EndIf
	 
		If Timer <= 0 
			SetCriticalStage DisintegrateEnd
			SMS ACIDFX
			SMS ACIDcriticalFX
			Set DoOnce to 1
		EndIf
		Set Timer to (Timer - GetSecondsPassed)
	EndIf

Now it has become more apparent that you're missing an END statement for the ScriptEffectUpdate block.

--------------THX but i cant save

Link to comment
Share on other sites

WHAT CAN I DO¿¿

You can start by adding the END statement that you're missing.

 

If that doesn't help you're probably using a non-existing editor ID. ACIDFX or ACIDcriticalFX, maybe. If these objects don't exist your script fails to compile.

Link to comment
Share on other sites

Don't know what to tell you; the script compiles just fine for me after closing the block and with neccessary effect shader objects created.

 

Only things that come to mind is that ACIDFX & ACIDcriticalFX are not effect shader objects or that you're trying to save it as a quest script.

 

Other than that, I can't help you any further.

Link to comment
Share on other sites

Not endif, that's for closing if statements.

 

You need to insert an end statement to close the ScriptEffectUpdate block. That would be at the bottom of your script, after all the lines belonging to that block.

 

If you need to ask about that, I think you better have a look at this: Scripting for Beginners

Edited by Ladez
Link to comment
Share on other sites

  • Recently Browsing   0 members

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