Jump to content

Quick Question - Quick Answer


Cipscis

Recommended Posts

  • Replies 804
  • Created
  • Last Reply

Top Posters In This Topic

Perhaps if you post the piece of code? i have not had any problems with getrandompercent in the past.

Sure, here's the abbreviated version (clipped out the bulk of the effects). Its an effect script that's attached to a spell (let's call it SpellA), which is placed on an actor via CastImmediateOnSelf via another scripted spell, SpellB, which is part of a weapon enchant. Its really pretty messy, using spell effect scripts to cast other spell effect scripts in chains, but its one of the methods I can simulate "functions" like in a normal program (I may not look it, but I learned C/C++ and Motorola's ASM). I think I saw FOSE having a Label function when I was scrolling through the command set, but I haven't gotten around to messing much with it yet.

 

Begin ScriptEffectStart
set Rand to getrandompercent
	if Rand < 30
		castimmediateonself AnotherSpell1
	elseif Rand < 65
		castimmediateonself AnotherSpell2
	elseif Rand < 97
		;Do nothing
	elseif Rand == 97
		castimmediateonself AnotherSpell3
	elseif Rand == 98
		castimmediateonself AnotherSpell5
	else
		castimmediateonself AnotherSpell6
	endif
endif
End

Link to comment
Share on other sites

Doesn't look wrong, it's either one of two things:

 

1) It doesn't like the name Rand for a variable, perhaps there's a global already with that name. Such things can happen.

2) Something from the "bulk of effects" that you cleaned up for posting is the culprit.

Link to comment
Share on other sites

Changed Rand to something else, and it seems to have worked. Thing is, I've been using that name in other scripts of a similar nature, but there weren't any problems. Must be one of those cases of "it shouldn't work properly, but appears to." Thanks for the help.
Link to comment
Share on other sites

I put my FOSE download in my Fallout 3 folder and when I load up fallout using the fose_launcher I have no saves. I did what the readme said like moving the saves out from "C:\Users\name\Documents\My Games\Fallout3" and back in again. That didn't work.

 

This is my Fallout 3 directory "C:\Program Files\Steam\steamapps\common\fallout 3". halp.

Link to comment
Share on other sites

Hi, i've been trying to get some kind of project i had into reality but i believe there is no current way.

I wanted to print a model into the hud, like a scope but i can't find any function that may do this. I don't want to attach an object without collision to the head because it would look weird in 3rd person view, so i don't really know what to do here, any ideas?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...