I'm trying to make a Shopselling NPC (inside the computer that is, a hacky way but there's no way to launch the conversation off ACS! ), however I have a question, how the things are identified in strife dialog language!? Actor names don't work, their doomeds either, not even spawnIDs work. What the hell? Here's the code. Also no, the zdoom wiki article on dialog scripts doesn't explain how things are identified, not even KSSC3 docs do. It's frustrating much out of me as it holds Xenus 3 from being developed
[spoiler]ACTOR 1
NAME "Shop-o-matic"
DIALOG "Hello soldier! What do you want to buy? We have four offers for you! First off, a Medikit for 25 gold, i'm sure you will get an use from it! a box of clip ammo for your pistol, useful against enemies! Only for 50 gold. Got enough of enemies destroying your soldier suit? We present you the classic 22nd-century genius Green Titan Armor, it will take up about 25 bullets before it breaks. Only for 100 gold"
IF_ITEM 2
IF_ITEM2 0
IF_ITEM3 0
CHOICE
TEXT "Medikit"
GIVE 188
LINK -1
YES "HERE YOU GO SIR."
NO "GO TAKE AN ASSIGNMENT AND EARN MONEY"
LOG 0
COST 2 * 25
ALTCOST 0 * 0
;
CHOICE
TEXT "CLIP OF BULLETS"
GIVE 179
LINK -1
YES "TAKE THE BOX AND BLAST AWAY!"
NO "YOU CAN DO BETTER THAN THAT"
LOG 0
COST 2 * 50
ALTCOST 0 * 0
;
CHOICE
TEXT "GREEN TITAN ARMOR"
GIVE 180
LINK -1
YES "HAVE A SAFE MISSION!"
NO "SORRY, PAY ME FIRST!"
LOG 0
COST 2 * 30
ALTCOST 0 * 0
;
END[/spoiler]
[spoiler]actor Money : Inventory 21111
{
ConversationID 2
inventory.amount 1
inventory.maxamount 0x7FFFFFFF
inventory.pickupmessage "Picked up some dropped money.."
inventory.icon "MONEA0"
spawnid 2
+inventory.alwayspickup
+inventory.invbar
States
{
Spawn:
COIN A -1
loop
}
}
actor ItemChecked : Inventory
{
inventory.pickupmessage ""
inventory.pickupsound ""
inventory.maxamount 1
states
{
Spawn:
TNT1 A -1
stop
}
}
actor Money1000 : CustomInventory 10108
{
inventory.pickupmessage "Picked up $1000, BINGO"
inventory.maxamount 0x7FFFFFFF
+ALWAYSPICKUP
states
{
Spawn:
CHST A -1
stop
Pickup:
TNT1 A 0 A_GiveInventory ("Money", 1000)
stop
}
}[/spoiler]
Also, are MOBJ IDs only way to do that? Sorry but i can't resort to dehacked for that. I need that in DECORATE
A strife dialog problem
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: A strife dialog problem
ConversationID!
You even used it once.
You even used it once.
- Firebrand
- Dev Builds Team
- Posts: 126
- Joined: Mon Aug 10, 2009 21:00
- Location: Mexico
- Contact:
Re: A strife dialog problem
True, when creating the items (or reusing them) make sure to add a ConversationID, this will make actors to recognize if you have certain items.
I'm the ruler of the Fire Power.....