|
Thread: any1 who's average+ with erm scripts here please: | |
|
Maccabi_Tel_...
Tavern Dweller
|
posted February 28, 2003 03:32 PM |
|
|
any1 who's average+ with erm scripts here please:
Every artifact has its own small text next to it, like if u see the Clover of Fortune artifact, then its that clover picture and right under it in small white text the name "Clover of Fortune", now, i've seen in a game the advanture cave - something like that, it asks u 2 places to go, like "rogue camp" and "wise man" if i remember correctly, at the choosing area down between 2 artifacts you see the text of the artifact "into rogue camp" for example and not "armageddon's blade" if its that artifact.
So what is the script line for this to happen? i couldnt find it. thanks!
____________
|
|
Fnord
Promising
Famous Hero
|
posted March 01, 2003 12:26 AM |
|
Edited By: Fnord on 28 Feb 2003
|
Quote: Every artifact has its own small text next to it, like if u see the Clover of Fortune artifact, then its that clover picture and right under it in small white text the name "Clover of Fortune", now, i've seen in a game the advanture cave - something like that, it asks u 2 places to go, like "rogue camp" and "wise man" if i remember correctly, at the choosing area down between 2 artifacts you see the text of the artifact "into rogue camp" for example and not "armageddon's blade" if its that artifact.
So what is the script line for this to happen? i couldnt find it. thanks!
The command to change the name of an artifact (whether for display purposes in a dialogue box or just to change it for the map in general) is UN:A (see the ERM Help file UN Receiver for details and full syntax).
The way to do it for a message, is to change the name (to the text stored in a z variable) and then restore the original name after displaying the message.
Here's a quick example:
Let's suppose you were scripting a restaurant object and gave the hero a few choices .. say, Ribs or Seasoned Boar. You decide to use the Rib Cage artifact for the ribs, and that has the artifact number 26.
First you assign the text you want to a z variable, say z150. Let's put the words "Juicy ribs" in there:
!!VRz150:S^Juicy ribs^;
Now we want to change the Rib Cage to have that text:
!!UN:A26/9/150;
That means, Artifact 26, info #9 (artifact name), will have its new name taken from z varaible 150.
We also want to change "Boar Riders" to "Seasoned boars" so we use UN:G to change the name temporarily. Boars are creature number 140. We'll store their new temporary name in z151.
!!VRz151:S^Seasoned boars^;
!!UN:G1/140/0/151;
This means change creature 140 to use the text stored in z151 (Seasoned boars). The 0 means that we're changing the singular name only.
Now let's display a question message with the ribs as one option and the seasoned boars as another. Flag 5 will store the result (left=true, right=false):
!!IF:Q5/8/26/21/140/7^Choose a menu item for your hero.^;
Q5 stores the result in flag 5. 8 is an artifact picture, 26 is the Rib Cage, 21 is a monster picture, and 140 is the Boars. 7 is the "choose one of two pictures" option.
After the message, you can put the following to restore the artifact and creatures to their default text:
!!UN:A26/9/0;
!!UN:G1/140/0/0;
In both cases, a value of 0 for the z variable number means "restore original text".
Note: to change the right-click text of the Rib Cage as well as the regular text under the picture, you would need to use a second UN:A command with the number 10 (for artifact description) instead of 9 (for artifact name). You could then use the same z variable (if you just want the name again when a player right-clicks) or a different z variable if you want different text there, such as the price or which wines go well with ribs.
____________
|
|
Maccabi_Tel_...
Tavern Dweller
|
posted March 01, 2003 11:01 AM |
|
|
Thanks!
i understood everything, now i can add it to my script
thanks again!
____________
|
|
Fnord
Promising
Famous Hero
|
posted March 01, 2003 07:56 PM |
|
Edited by Cepheus at 17:29, 23 Jul 2011.
|
Quote: i understood everything, now i can add it to my script
thanks again!
You're very welcome. Glad I could help.
---
Moderator note: This thread has been inactive for two years or longer, and has been archived (closed) to prevent necro-posting. If you wish to revive the topic, send a message to Cepheus or create a new thread in its place. Thank you.
____________
|
|
|
|