Jump to content

Ice Creation Issue


Recommended Posts

ok, so i am trying to make a pair of opposite spells that create and destroy ice. I have the destroying part down fine, however, getting the ice to come back is proving to be the issue. I originally wanted to make it so the ice was just disabled and then renabled, however, that does not seem to work. so now i need to make it so the ice moves to the target. I.E. i have water markers that look like puddles where i want the ice to be. So, the basic idea is shoot the marker, then a block of ice appears on that spot, however, that involves variables and coordinates and bizzare functions right? I was never a good scripter, and have been only doing the simplest of scripts, so can anyone help me? Or at least tell me what function i should use to get the coordinates to the watermarker which then would serve as the coordinates for the ice block? THANKS!
Link to comment
Share on other sites

this is my attempted (and for somereason unfuctional script) for the ice spell. basically, it is supposed to hit a particular reference (aaawaterpuddlea) and then spring up a message box. Then upon your choice, it should place the selected ice block object (aaaiceiceice) onto the reference. The difference in the choices is the z coordinate, which i wanted to make the different ice blocks higher or lower to allow for a jumping path. However, upon me trying to save the script, it says... syntax error on line 23 (which is the one with the first aaaiceiceice.moveto aaawaterpuddlea) saying that it is an invalid reference, and that only object references and reference variables are allowed. What is wrong?

 

Scn aaaicecreationscript

 

Short aaabutton

Short buttonvar

 

Begin scripteffectstart

If getisid aaawaterpuddlea == 1

Messagebox "What do you need?" "Small Ice Block" "Medium Ice Block" "Large Ice Block"

Set buttonvar to getbuttonpressed

Set aaabutton to 1

Elseif getisid aaawaterpuddlea == 0

Message "This is not water!"

Message "How dare you misuse us..."

Cast aaarunerefusehurt player

Endif

End

 

Begin scripteffectupdate

Set buttonVar To GetButtonPressed

If aaaButton == 1

If buttonVar > -1

If buttonVar == 0

aaaiceiceice.moveto aaawaterpuddlea (0,0,0)

elseIf buttonvar == 1

aaaiceiceice.moveto aaawaterpuddlea (0,0,2)

elseIf buttonvar == 2

aaaiceiceice.moveto aaawaterpuddlea (0,0,4)

Endif

Endif

endif

End

Link to comment
Share on other sites

A spell needs to actually hit a collision surface of an activator (and stop) for it to register. If your puddles don't have any static collision surface, all you're doing is hitting the ground beneath, whch results in nothing happening.
Link to comment
Share on other sites

true, but that is why i classified them as furniture, because the fact that spell casts the hurt spell when you fire it at misc. furniture/containers i figured it would register with that too. It also worked for the melting spell that i have, which disables it.
Link to comment
Share on other sites

do i really need to have all those variables if i specify the puddle as the place to have it be moved to? Really i want to make a bunch of spells that would allow you to be lifted up on an icy pillar or fiery pillar to reach certain places in the cities i am building. this is hopefully a step toward that, but if someone can just cut to the chase about how i would go about lifting the player up on the top of a pillar (retextured by me of course) that would actually be a bit more useful. But would that involve animation? because i cant even get my models into the game!!! So figuring out how to do that seems impossible. For right now, i want to keep everything controlled by only allowing these spells to be cast on a certain area, but this is all getting way above my scripting abilities, yet i need to figure out how to become good at something sooner or later, but i cant learn unless someone tells me, so to cap it all up, who could tell me either how to finish this idea, OR (preferably) tell me how to make a pillar to raise the character up from the ground when on a specified platform of some sort... ? Please, i dont want my mod of these cities to just be a combination of things that have been done before, so if anyone can help me, please do!!!
Link to comment
Share on other sites

true, but that is why i classified them as furniture, because the fact that spell casts the hurt spell when you fire it at misc. furniture/containers i figured it would register with that too. It also worked for the melting spell that i have, which disables it.

Containers are less reliable, and still need to have a collision surface for the spell to hit. Furniture typically does not register those sorts of things, and is intended instead as something which initiates a sit/sleep idle when used. Furniture would also, still, require a collision plane within the .nif. A collision box won't cut it, a trigger box won't cut it. It has to hit the actual activator.

 

Using an actual moving object would require an animated .nif. The easiest solution would be altering some of those meshes which already make use of a lifting animation (alyied ruin traps, Oblivion masher lifts) and replace, or retexture those parts. This is however a bit complicated, and requires a better than average understanding of how to link meshes to nodes.

 

As far as everything goes, you have your work cut out for you. I wouldn't attempt this sort of thing myself, not because it isn't possible, but because all the time and effort spent on all these little "features" probably isn't worth the result in the long run. The fact that you don't have access to someone able to make, and rig, all the new models, and don't seem to understand scripting very well, especially when it comes to unusual things like this. The best advice I can give you is to put the project aside for now, and work on each of those elements seperately, using existing meshes. Then you aren't spending all this extra time trying to figure out things, and making meshes for things, which probably won't work very well in the end. You won't get good any anything by beating your head against the wall trying to do one or two things, you get good by doing alot of less complicated things well, and understanding how everything is related. In short, start small. Rather than make some themed cities, make a non-themed one.

 

http://thenexusforums.com/index.php?showtopic=61126

Is a worldspace which could probably use some new modded cities with player houses. By doing that, you would not only get some good experience modding something that doesn't require any unusual features, but also something which people could use. Even with a project like that, you could work in some fairly complicated scripting by doing some quests, or adding a buyable house. Don't think that you have to do scripting, modeling, or texturing to be good. A well designed interior or town can be much more useful to more people than any scripting, modeling, or texturing. It is those who can do those sorts of interior and exterior work which provides new places for people to visit. Take me for example, I spent alot of time figuring out scripting, AI, and modeling, but kinda suck when it comes to making worldspaces, and should have probably spent more time learning how to arrange interiors well.

Link to comment
Share on other sites

how might i go about making it so that one of those dark welkynd stones (that attack you in Ayleid Ruins) only attack you when you are in combat with a guard? Here is my suggested script, but everytime i test it, they just keep firing off the spell.

scn aaafireguardcrystal

; when activated by combat with guard will launch spell at player after 5 sec

 

float rechargetimer

 

begin onActivate

if aaatestguard.isincombat == 1 && aaatestguard.getcombattarget == player

set rechargeTimer to 0

endif

end

begin gameMode

set rechargeTimer to rechargeTimer - getSecondsPassed

if rechargeTimer>0 || getDistance player>1500

return

endif

 

cast aaafireguardcrystalspell player

cast aaarunerefusehurt2 player

set rechargeTimer to 5

end

Link to comment
Share on other sites

i hope that this idea is simple enough but still creative to add something new to my citites. I really want to do a crack down on crime, to make it more challenging for thieves. I have a couple of ideas. But they kind of centralize on things becoming active once the player is in combat with the guards, or something is stolen, or the player has a bounty. So are there particular commands i could use for this? and how do you scriptingly say "or"?
Link to comment
Share on other sites

float rechargetimer
short PCcrime

begin onActivate
set rechargeTimer to 0
endif 
end 

begin gameMode 
if aaatestguard.isincombat == 1 && aaatestguard.getcombattarget == player
set pccrime to 1
elseif player.getcrimegold >= 50
set PCcrime to 1
else
set PCcrime to 0
endif


if PCcrime == 1
set rechargeTimer to rechargeTimer - getSecondsPassed 
 if rechargeTimer>0 || getDistance player>1500 
return 
 endif
cast aaafireguardcrystalspell player
cast aaarunerefusehurt2 player
set rechargeTimer to 5
endif
end

 

should work like that. Keep in mind that things like this actually end up causing more harm than good because those spell castings are shot to where the player currently is, not where they will be moving to. meaning at they can be used to kill guards and other NPCs without having any additional fines. The best way to deal with crime is to really just have guards that can beat the hell out of people. If people get killed in 1 or 2 hits, when they're already wearing cheat items, they'll think twice about running around with a bounty.

 

You could also considder setting up the spell used to be script based, and not damage based. A simple

ref actor
short presneak
short posneak

begin scripteffectstart
set actor to getself
set presneak to actor.getav sneak
set posneak to (presneak * -1)

if actor.getcrimegold >= 100
actor.modav paralysis 1
actor.modav sneak posneak
sctor.modav silence 1
endif

begin scripteffectupdate
if actor.getcrimegold >= 100
if actor.getav paralysis == 1
actor.modav paralysis -1
endif
endif
end

Begin scripteffectfinish
if actor.getcrimegold >= 100
actor.modav sneak presneak
sctor.modav silence -1
endif
end

 

or just make the script apply an ability with the desired spell effects based on a getcrimegold. That way you can make the bolt fired from the gems only affect the player/criminal, and not anyone else, and can make use of area of effect to make up for poor aiming.

Link to comment
Share on other sites

OMG you are the best person ever!

actually, i completely agree with you on the idea that it should only effect the criminal/player! As a matter of fact, once someone figured out how to make it work just for when the player is in trouble, i was going to spell chain it a little, so that the first spell could be a paralysis, and then a long, slow, damage spell. Is that what you did in the second one? I am so bad i cant even really tell! thanks so much for this! It really helps unbelievably, with the mod and my sanity!!! THANKS!

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...