[Director] in stappen sprite verkleinen

Pagina: 1
Acties:

  • ReseTTim
  • Registratie: Juni 2000
  • Laatst online: 19-08 16:11

ReseTTim

Chocolate addicted

Topicstarter
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
property verklein, verkleinfactor
property pHoogte, pBreedte
--property currentwidth, currentheight
property spriteNum
property startTime -- the time at the start of the timer
property timeoutDuration  -- the duration of the wait
property timeMe -- a "toggle" to control the action in the exitFrame handler
property spriteNummer

on beginSprite me
  -- uiteindelijke Width (W) en Height (H)
  -- H = 758
  -- W = 545
  
  -- groot hoe die nu op de stage staat
  --H = 682
  --W = 1019
  
  if sprite(spriteNum).Width = 1019 then pBreedte = 1019
  if sprite(spriteNum).Height = 682 then pHoogte = 682
  
  
  
  --pBreedte = the width of the sprite
 -- pHoogte = the Height of the sprite
  
  -- currentwidth= 1019
  -- currentheight = 682
  
  verkleinfactor = (100 - verklein)/ 100 -- verkleinings percentage
  timeoutDuration = timeoutDuration * 30
  startTime = the ticks  
  -- use this line if you want the timer to start when the sprite hits the stage
  timeMe = 1 -- use this line if the timer starts when the sprite hits the stage
  --  timeMe = 0 -- use this line if the timer starts when the user clicks the sprite
  
end

on getPropertyDescriptionList
  description = [:]
  addProp description,#verklein, [#default:50,#comment:"Hoeveel verkleint de gangdeur:",#format:#integer,#range:[#min:1, #max:99]]
  addProp description,#timeoutDuration, [#default:5, #comment:"the duration of the time out wait in seconds:",#format:#integer,#range:[#min:1,#max:60]]
  return description
end

on exitframe
  
  if timeMe then
    if the ticks > startTime + timeoutDuration then 
     -- the timer is up
    timeMe = 0
    
    pBreedte = pBreedte * verkleinfactor
    pHoogte = pHoogte * verkleinfactor
    
    end if
  end if
  
  updatestage 
end

wat mijn bedoeling dus is dat ik per sec. of minder een sprite in stappen laat verkleinen. ik hang dit dus ook aan een sprite.
kan iemand mij hiermee helpen? want mij lukt het niet.

Mijn profiel - Te koop: Overzicht van spullen..


  • ReseTTim
  • Registratie: Juni 2000
  • Laatst online: 19-08 16:11

ReseTTim

Chocolate addicted

Topicstarter
kickje mag nu wel.. ok tis geen 24uur.. tis 22 uur maar maakt niet uit.. weet iemand hoe ik het werkend kan krijgen..

Mijn profiel - Te koop: Overzicht van spullen..


Verwijderd

Kun je niet de hele .dir file hier posten, dat zou een stuk makkelijker zijn.
Of tenminste duidelijk aangeven, hoe je het allemaal verdeeld hebt over spritescripts,moviescripts,framescripts enz..
En ik zie nergens iets waar je de grootte van de sprite aanpast eigenlijk.

  • ReseTTim
  • Registratie: Juni 2000
  • Laatst online: 19-08 16:11

ReseTTim

Chocolate addicted

Topicstarter
Op zaterdag 29 juni 2002 01:38 schreef hidiho het volgende:
Kun je niet de hele .dir file hier posten, dat zou een stuk makkelijker zijn.
Of tenminste duidelijk aangeven, hoe je het allemaal verdeeld hebt over spritescripts,moviescripts,framescripts enz..
En ik zie nergens iets waar je de grootte van de sprite aanpast eigenlijk.
dat is de grap juist dat weet ik ff niet hoe ik dat moet doen.. ik zal kijken of ik zow ff het .dir bestand kan uppen..

Mijn profiel - Te koop: Overzicht van spullen..