Jump to content

need help with a script


mlmbug

Recommended Posts

heres a weapon script i'm trying to get working for some reason it doesn't seem to like changing a quest value.

 

scn OBSERVERblaster

float waitsmall

short ammo

begin onequip

if player.getequipped ammomicrobreederMLMOBSERVERspawner
	set ammo to 1
endif

if player.getequipped ammomicrobreederMLMOBSERVERspawner2
	set ammo to 2
endif

end


begin onfire

set waitsmall to waitsmall + getsecondspassed
	if waitsmall >= 0.8
		if ammo == 1
			set 1observerspawnedcontrol.helperspawned to 1
		endif
		if ammo == 2
			set 1observerspawnedcontrol.psycospawned to 1
		endif
		set waitsmall to 0
		set ammo to 0
	endif

end

 

this is the quest side of the script

 

scn ObserverSpawnedCharsKeeper

short doonce

float htimer
float ptimer

short helperspawned
short psycospawned


begin gamemode

if doonce == 0
	set helperspawned to 0
	set psycospawned to 0
	set doonce to 1
endif

if psycospawned == 2
	set ptimer to ptimer + Getsecondspassed
	if ptimer >= 30
		set psycospawned to 0
		set ptimer to 0
	endif
endif

if helperspawned == 2
	set htimer to htimer + getsecondspassed
	if htimer >= 30
		set helperspawned to 0
		set htimer to 0
	endif
endif

if helperspawned == 0
	observergrenadespawnedref.moveto spawnedhelpermarkerREF
	observergrenadespawnedref.disable
endif

if psycospawned == 0
	observergrenadespawned2ref.moveto spawnedattackermartkerREF
	observergrenadespawned2ref.disable
endif


if helperspawned == 1
	observergrenadespawnedref.moveto OBSERVERMobleHmarkREF
	set helperspawned to 2
	observergrenadespawnedref.enable
endif

if psycospawned == 1
	observergrenadespawned2ref.moveto OBSERVERMobileSpawnREF
	set psycospawned to 2
	observergrenadespawned2ref.enable
endif


end

Link to comment
Share on other sites

The GECK's compiler has issues finding editorIDs that start with a number, like 1observerspawnedcontrol. If you change it to, say, observerspawnedcontrol, then your script shouldn't have this issue.

 

I've never been a fan of putting a sorting prefix like "aaa" at the start of editorIDs. Partly because I think it makes a mod look messy (even when that's not the case), and otherwise because there are much cleaner ways of sorting forms in order to find yours easily. For example, you could sort by the formID column (initially hidden in the object tree, to the right of the editorID column), or you could add a unique string to your editorIDs that is somehow related to your username and/or the name of your mod and use the object tree's "filter" function.

 

Cipscis

Link to comment
Share on other sites

thanks! this helps a lot. by the way i think you said pretty much the same thing over on the bethesda forums, but it's still helpful to post problems the geck has (so we can help others with the same problem).
Link to comment
Share on other sites

  • Recently Browsing   0 members

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