Diablo Town Portal Function

jetlee

Member!
Joined
Feb 7, 2003
Messages
167
Reaction score
0
Location
Ohio
Website
www.geocities.com
Alrite anyone...just anyone who knows trigs help me on this one? One of you grasshoppas perhaps...well how would you make a town portal function and work just like in diablo II? You know when you use item such as a town portal and a portal opens....you go into it and u go into town....darimus or anybody help meeee!give me example of the trigg not the dl plz
 

tassadar920

Member!
Joined
May 18, 2003
Messages
2,048
Reaction score
0
Location
My house
Not hard:

First off, make a new item that has no spell cast, and no attributes

Event - An item is used
Conditions - Item equal to "scroll of TP"
Actions - Create a special effect at position of hero using item
For each integer from 1 - ## do (Loop) Actions
Loop-Actions
If(A unit is region centered at position of last created special effect) Then (Move him to town) Else (do crap)
wait a few seconds

Then at the end remove the special effect
 

jetlee

Member!
Joined
Feb 7, 2003
Messages
167
Reaction score
0
Location
Ohio
Website
www.geocities.com
one problem with that is that it doesnt teleport the hero anytime u want it to...help me on this one but would it be better if it was create unit -a model art with portal and with ability waygate?
 

Jimstick

Member!
Joined
Oct 27, 2003
Messages
38
Reaction score
0
Website
Visit site
uhh... well if you create a region and call it "TP Spot" or something like that and have it center on the position of the unit that uses the scroll then it should work. Just add this to the top of tassadar920's trigger in the action spot then it would help. (centering the region would only move the region to the spot, not follow the guy around, if ya didn't know)
Actually the trigger might be better like this.
-
----Event
-------generic unit event - a unit uses an item
-
----Condition
-------item type comparrison - item is equal to *scroll of TP*
-
----Action
-------center regoin - move region to position of triggering unit
-------Actions - Create a special effect at position of hero using item
-------trigger - turn on trigger TP to town
-------trigger - turn on trigger town to TP
-
trigger TP to town could be
-
----Event
-------time - periodic event - every .1 seconds
-
----Conditions
-------none
-
----Action
-------Unit - pick every unit in TP spot
-----------unit - point with offset - move picked unit to center of *town to TP region* offset by (###,###)
-
after that you would have to make a return trigger similar to the above trigger but it would have to have as an action after the "pick every unit" part that goes.

if\then\else
-
----conditions
-------picked unit is equal to triggering unit
-
----Then
-------turn off thistrigger
-------turn off "TP to town"
-
yep, im pretty sure this should work but i haven't tested it. If it doesn't then i will test it and find out what i did wrong :p
for the position offset, if you want them to appear to the right of the "town to TP" region then set the x offset to about 300 if you want them on the left put -300
good luck man
 

jetlee

Member!
Joined
Feb 7, 2003
Messages
167
Reaction score
0
Location
Ohio
Website
www.geocities.com
thanks dood! Hey uhh how would you try to make an item system where u would have to identify it just like diablo and repair it ? Thanks :butterfly
 

Jimstick

Member!
Joined
Oct 27, 2003
Messages
38
Reaction score
0
Website
Visit site
ok first, for the durability thing, you would need to make a variable integer call "wepdur" and have a trigger that replaces the current with an item called "broken weapon" when the "wepdur" reaches zero and puts the old weapon at an oldweapon area and returns it when the you get "broken weapon" repaired. You would have to make a dialog box and do it. that would get really complicated. For the identify item thing you could make an item called unident item or something like that and when you goto whats his face and it get replaced with a random item. Also might need to use a dialog thing. Sorry if this really sloppy and confusing but i'm at a friends house and dont have much time. Good luck.
 

NewPosts

New threads

Top