Aller au contenu

Photo

Slight randomization with scripts/triggers for an area


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
JonathonSnell

JonathonSnell
  • Members
  • 2 messages
Hello everyone,

I'm somewhat new to the modding scene and would like to see if one of my ideas would work with the toolset.

What I'm wondering is if you could have a trigger go off at some point in the area that will randomly choose between a few events.  Say your character walks into a clearing and there are 3 things that could happen:
1) Nothing
2) You are attacked by Dalish
3) You are attacked by Darkspawn

Would this be possible to code, say have a RNG generate a number between 1-10 and then if it's 1-4 do (1), 5-7 do (2) and 8-10 do (3).  Pretty much just write a trigger that will randomly choose to execute one of the three events. 

#2
CID-78

CID-78
  • Members
  • 1 124 messages
yes there is a random() function so it's all up to your scripting , what happens on what value.

#3
JonathonSnell

JonathonSnell
  • Members
  • 2 messages
Thanks for the quick answer.
I'm also wondering if this could be used for area transitions then or if area transitions can only go to one place.
Example:
Area1-Exit1 can go to Area2, Area3 or Area4
By the sounds of things I think this should be possible but I'm wondering if anyone has tried or is going to try this.
Also, just thinking of the scripting, if random transitions are possible, then it is probably also possible to lock which area to go to after you have used the transition once.
Say if Area1-Exit1 went to Area2 the first time, if you go back and forth between the transitions it will now always go between Area2 and Area1 instead of randomly going to Area3 or 4.

I think these things could possibly open up a lot of ideas so it's also some food for thought for others.

Modifié par JonathonSnell, 01 novembre 2009 - 09:54 .


#4
Proleric

Proleric
  • Members
  • 2 346 messages
Yes, scripting allows you to do almost anything with area transitions. You can also allow the player to choose a destination from the world map or a list.